diff options
author | Ilya Etingof <etingof@gmail.com> | 2019-07-20 13:18:25 +0200 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2019-07-20 13:18:25 +0200 |
commit | 63a107fb8a330c58c259f4afe89397124ae29ef8 (patch) | |
tree | ec9934d014126b50bfec907a820c5875370bb843 /tests/__main__.py | |
parent | b5eb18384659ef1da9f72158626c6779c1214679 (diff) | |
download | pyasn1-modules-63a107fb8a330c58c259f4afe89397124ae29ef8.tar.gz |
Unit tests runner returns proper error status to OS
Diffstat (limited to 'tests/__main__.py')
-rw-r--r-- | tests/__main__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/__main__.py b/tests/__main__.py index 08b0424..bff38c4 100644 --- a/tests/__main__.py +++ b/tests/__main__.py @@ -53,4 +53,7 @@ suite = unittest.TestLoader().loadTestsFromNames( if __name__ == '__main__': - unittest.TextTestRunner(verbosity=2).run(suite) + import sys + + result = unittest.TextTestRunner(verbosity=2).run(suite) + sys.exit(not result.wasSuccessful()) |