Browse files

Force tests to exit with a non-zero return code on failure when runni…

…ng `cheetah test`

Patch from: Mike Bonnet <mikeb@redhat.com>

Change-Id: Ie20348e1272d6102381c467e414bd176bbc2b9b9
  • Loading branch information...
1 parent e9b2d30 commit 4fc404506214df31f3be7b3e6ffd08bda4472f4b @rtyler rtyler committed Dec 12, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 cheetah/CheetahWrapper.py
View
7 cheetah/CheetahWrapper.py
@@ -232,7 +232,7 @@ def compile(self):
def fill(self):
from Cheetah.ImportHooks import install
- install()
+ install()
self._compileOrFill()
def help(self):
@@ -264,12 +264,13 @@ def test(self):
verbosity = 2
runner = unittest.TextTestRunner(verbosity=verbosity)
runner.run(unittest.TestSuite(Test.suites))
-
+ results = runner.run(unittest.TestSuite(Test.suites))
+ exit(int(not results.wasSuccessful()))
+
def version(self):
print(Version)
# If you add a command, also add it to the 'meths' variable in main().
-
##################################################
## LOGGING METHODS

0 comments on commit 4fc4045

Please sign in to comment.