Skip to content

Commit

Permalink
Exit tests with 1 on fails
Browse files Browse the repository at this point in the history
  • Loading branch information
VRSEN committed Jan 10, 2024
1 parent 6d6c7db commit 7b6a1f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion run_tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import unittest
import os
import sys

if __name__ == '__main__':
# Change the current working directory to 'tests'
Expand All @@ -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)

0 comments on commit 7b6a1f7

Please sign in to comment.