diff --git a/run_tests.py b/run_tests.py index a45c5589..9d7739d1 100644 --- a/run_tests.py +++ b/run_tests.py @@ -1,5 +1,6 @@ import unittest import os +import sys if __name__ == '__main__': # Change the current working directory to 'tests' @@ -11,4 +12,8 @@ # Create a test runner that will run the test suite runner = unittest.TextTestRunner() - runner.run(suite) + result = runner.run(suite) + + # Exit with a non-zero exit code if tests failed + if not result.wasSuccessful(): + sys.exit(1)