test: check the number of tests that ran

Fail if the number of excuted tests != number of dicovered tests.
This commit is contained in:
Alexander Todorov 2019-07-04 13:11:03 +03:00 committed by Lars Karlitski
parent 2c141950b0
commit 197c326530

View File

@ -186,4 +186,8 @@ def main():
runner = ComposerTestRunner(failfast=args.sit) runner = ComposerTestRunner(failfast=args.sit)
result = runner.run(tests) result = runner.run(tests)
if tests.countTestCases() != result.testsRun:
print("Error: unexpected number of tests were run", file=sys.stderr)
sys.exit(1)
sys.exit(not result.wasSuccessful()) sys.exit(not result.wasSuccessful())