Added non-zero exit code for errors/failures during tests.

parent 1e95b6a2
......@@ -145,4 +145,9 @@ def main(tests, verbose=0, color=True):
runner = TextTestRunner(verbosity=verbose, color=color)
suite = unittest.TestSuite(testcases)
suite.filename = testfile
runner.run(suite)
result = runner.run(suite)
# Return non zero exit code if there are failures or errors occured.
if result.failures or result.errors:
sys.exit(1)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment