From 63a107fb8a330c58c259f4afe89397124ae29ef8 Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Sat, 20 Jul 2019 13:18:25 +0200 Subject: Unit tests runner returns proper error status to OS --- tests/test_rfc2437.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/test_rfc2437.py') diff --git a/tests/test_rfc2437.py b/tests/test_rfc2437.py index 7eaedd6..2490d10 100644 --- a/tests/test_rfc2437.py +++ b/tests/test_rfc2437.py @@ -47,4 +47,7 @@ n8lDw3JT6NjvMnD6aM8KBsLyhazWSVVkaUSqmJzgCF0= suite = unittest.TestLoader().loadTestsFromModule(sys.modules[__name__]) if __name__ == '__main__': - unittest.TextTestRunner(verbosity=2).run(suite) + import sys + + result = unittest.TextTestRunner(verbosity=2).run(suite) + sys.exit(not result.wasSuccessful()) -- cgit v1.2.3