diff options
author | Liam Young <liam.young@canonical.com> | 2014-07-16 12:20:22 +0100 |
---|---|---|
committer | Liam Young <liam.young@canonical.com> | 2014-07-16 12:20:22 +0100 |
commit | 0524c20ed378adfdd1bcb82b344e8833a5325e4a (patch) | |
tree | cd24c166f4d6d01e49ef85976f228a05b4be197c | |
parent | 34b4110bc6007aac6b4b4b3a54333eaff26f24ec (diff) | |
download | logutils-0524c20ed378adfdd1bcb82b344e8833a5325e4a.tar.gz |
Ensure that test failures result in a non-zero exit code.
-rw-r--r-- | setup.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -27,7 +27,9 @@ class TestCommand(distutils.core.Command): import logutil_tests loader = unittest.TestLoader() runner = unittest.TextTestRunner() - runner.run(loader.loadTestsFromModule(logutil_tests)) + test_results = runner.run(loader.loadTestsFromModule(logutil_tests)) + if not test_results.wasSuccessful(): + sys.exit(1) def initialize_options(self): pass |