summaryrefslogtreecommitdiff
path: root/cherrypy/test/modpy.py
diff options
context:
space:
mode:
authorRobert Brewer <fumanchu@aminus.org>2006-12-28 19:27:08 +0000
committerRobert Brewer <fumanchu@aminus.org>2006-12-28 19:27:08 +0000
commitbce6251732ebe9bb1d750a31c610ff0d501507a7 (patch)
treeec13972a5c25d1bdb5155881931d68951b7ba243 /cherrypy/test/modpy.py
parenta335dbffb945caf9ea82d0a221989b1bb5e2a9f4 (diff)
downloadcherrypy-git-bce6251732ebe9bb1d750a31c610ff0d501507a7.tar.gz
The modpy tests were not returning an exit code.
Diffstat (limited to 'cherrypy/test/modpy.py')
-rw-r--r--cherrypy/test/modpy.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/cherrypy/test/modpy.py b/cherrypy/test/modpy.py
index d133517d..e035f616 100644
--- a/cherrypy/test/modpy.py
+++ b/cherrypy/test/modpy.py
@@ -146,11 +146,17 @@ class ModPythonTestHarness(test.TestHarness):
# started separately for each test, and then *that* process
# must run the setup_server() function for the test.
# Then our process can run the actual test.
+ success = True
for testmod in self.tests:
try:
start(testmod, self.port, conf_template)
suite = webtest.ReloadingTestLoader().loadTestsFromName(testmod)
- webtest.TerseTestRunner(verbosity=2).run(suite)
+ result = webtest.TerseTestRunner(verbosity=2).run(suite)
+ success &= result.wasSuccessful()
finally:
stop()
+ if success:
+ return 0
+ else:
+ return 1