Skip to content
Snippets Groups Projects
Commit 12e841a7 authored by Bryan Brancotte's avatar Bryan Brancotte
Browse files

Return non zero code on failure

parent ecae3119
No related branches found
No related tags found
1 merge request!7Return non zero code on failure
Pipeline #13249 failed with stage
in 39 seconds
#!/usr/bin/env python
import sys
import unittest
#Run all tests
if __name__ == '__main__':
# Run all tests
def main(args=None):
test_loader = unittest.TestLoader()
test_suite = test_loader.discover('tests', pattern='test_*.py')
runner = unittest.TextTestRunner()
runner.run(test_suite)
results = runner.run(test_suite)
return results.wasSuccessful()
if __name__ == '__main__':
sys.exit(0 if main(sys.argv[1:]) else 1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment