Permalink
Browse files

Change `setup.py test`s return value according to the results

Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
  • Loading branch information...
1 parent 07d334a commit d80da48438724ab549f4ef3e1c60f2b2199986d1 @mineo mineo committed Apr 9, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 setup.py
View
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+import sys
from distutils.core import setup
from distutils.core import Command
@@ -40,7 +41,8 @@ def run(self):
names.append("test." + name)
tests = unittest.defaultTestLoader.loadTestsFromNames(names)
t = unittest.TextTestRunner(verbosity=self.verbosity)
- t.run(tests)
+ result = t.run(tests)
+ sys.exit(not result.wasSuccessful())
setup(
name="musicbrainzngs",

0 comments on commit d80da48

Please sign in to comment.