diff options
author | Frederic Peters <fpeters@entrouvert.com> | 2004-07-25 12:43:57 +0000 |
---|---|---|
committer | Frederic Peters <fpeters@entrouvert.com> | 2004-07-25 12:43:57 +0000 |
commit | b40a7c6a9f28903bf9972bcf1e562e55fc688617 (patch) | |
tree | baa638badd0c24a56d5753f20bfbde133da96fd4 /python/tests/tests.py | |
parent | 03d61844cddff31ee00b1f5847276f9ba9a488fd (diff) | |
download | lasso-b40a7c6a9f28903bf9972bcf1e562e55fc688617.tar.gz lasso-b40a7c6a9f28903bf9972bcf1e562e55fc688617.tar.xz lasso-b40a7c6a9f28903bf9972bcf1e562e55fc688617.zip |
nozero exit code if a test failed
Diffstat (limited to 'python/tests/tests.py')
-rwxr-xr-x | python/tests/tests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/tests/tests.py b/python/tests/tests.py index de359ee5..644135eb 100755 --- a/python/tests/tests.py +++ b/python/tests/tests.py @@ -38,6 +38,7 @@ testSuites = ( 'login_tests', ) +success = True for testSuite in testSuites: fp, pathname, description = imp.find_module(testSuite) try: @@ -58,5 +59,8 @@ for testSuite in testSuites: print doc print '-' * len(doc) - unittest.TextTestRunner(verbosity=2).run(module.allTests) + result = unittest.TextTestRunner(verbosity=2).run(module.allTests) + success = success and result.wasSuccessful() + +sys.exit(not success) |