unittest: Exit with non zero code in case of failures. Fixing #259

pull/261/merge
Konstantin Belyalov 2018-02-21 19:20:12 -08:00 zatwierdzone przez Damien George
rodzic 0a581ef357
commit 912f9413ac
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -1,3 +1,6 @@
import sys
class SkipTest(Exception):
pass
@ -217,3 +220,5 @@ def main(module="__main__"):
suite.addTest(c)
runner = TestRunner()
result = runner.run(suite)
# Terminate with non zero return code in case of failures
sys.exit(result.failuresNum > 0)