Permalink
Browse files

test.py: return proper exit code to shell on failure

This change helps downstream packagers make the package build fail
if a test fails.
  • Loading branch information...
1 parent a80ce59 commit 1df6173085a6729e37fdefd2475a0b8a257e2b11 Alex Chiang committed Feb 10, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 test.py
View
@@ -393,5 +393,7 @@ def test_method_restrictions(self):
process = Process(target=run_server)
process.start()
time.sleep(0.1)
- unittest.main(exit=False)
- process.terminate()
+ try:
+ unittest.main()
+ finally:
+ process.terminate()

0 comments on commit 1df6173

Please sign in to comment.