diff options
author | R. Tyler Croy <tyler@monkeypox.org> | 2010-12-12 19:46:10 -0800 |
---|---|---|
committer | R. Tyler Croy <tyler@monkeypox.org> | 2010-12-12 19:46:10 -0800 |
commit | 4fc404506214df31f3be7b3e6ffd08bda4472f4b (patch) | |
tree | 6fa21516aff3d341614f4af678eb7afc22f8bec1 | |
parent | e9b2d300fce75a77aeacbe1e71767a88cb572d58 (diff) | |
download | python-cheetah-4fc404506214df31f3be7b3e6ffd08bda4472f4b.tar.gz |
Force tests to exit with a non-zero return code on failure when running `cheetah test`
Patch from: Mike Bonnet <mikeb@redhat.com>
Change-Id: Ie20348e1272d6102381c467e414bd176bbc2b9b9
-rw-r--r-- | cheetah/CheetahWrapper.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cheetah/CheetahWrapper.py b/cheetah/CheetahWrapper.py index 6203e0b..77a5696 100644 --- a/cheetah/CheetahWrapper.py +++ b/cheetah/CheetahWrapper.py @@ -232,7 +232,7 @@ Files are %s""", args, pprint.pformat(vars(opts)), files) def fill(self): from Cheetah.ImportHooks import install - install() + install() self._compileOrFill() def help(self): @@ -264,12 +264,13 @@ you do have write permission to and re-run the tests.""") 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 |