Permalink
Browse files

Return the correct status code when tests fail. Travis will actually …

…work now.
  • Loading branch information...
1 parent d832bed commit 4707a4346df1068c4135854095290272b90446d2 @davbo davbo committed Sep 14, 2012
Showing with 4 additions and 2 deletions.
  1. +1 −1 moxie/tests/__init__.py
  2. +3 −1 runtests.py
View
@@ -3,4 +3,4 @@
def main():
# Run all TestCases
suite = unittest.TestLoader().discover('moxie.tests')
- unittest.TextTestRunner(verbosity=2).run(suite)
+ return unittest.TextTestRunner(verbosity=2).run(suite)
View
@@ -2,4 +2,6 @@
import sys, os
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
from moxie.tests import main
-main()
+result = main()
+if not result.wasSuccessful():
+ sys.exit(1)

0 comments on commit 4707a43

Please sign in to comment.