Implement test coverage for app

This commit is contained in:
2025-10-03 22:43:16 -04:00
parent 1e1ed287b5
commit 641ab6be67
5 changed files with 129 additions and 6 deletions

View File

@@ -37,15 +37,22 @@ except ImportError:
def run_tests(*test_args):
from coverage import Coverage
cov = Coverage()
if not test_args:
test_args = ['ai_blocker.tests']
TestRunner = get_runner(settings)
test_runner = TestRunner()
cov.start()
failures = test_runner.run_tests(test_args)
cov.stop()
if failures:
sys.exit(failures)
cov.html_report()
if __name__ == '__main__':
run_tests(*sys.argv[1:])