diff options
Diffstat (limited to 'cherrypy/test/helper.py')
| -rw-r--r-- | cherrypy/test/helper.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cherrypy/test/helper.py b/cherrypy/test/helper.py index fa3b89f8..e3006a52 100644 --- a/cherrypy/test/helper.py +++ b/cherrypy/test/helper.py @@ -300,8 +300,9 @@ class CPWebCase(webtest.WebCase): if self.do_gc_test: self.getPage("/gc/stats") self.assertBody("Statistics:") - # Tell nose to run this last in each class - test_gc.compat_co_firstlineno = float('inf') + # Tell nose to run this last in each class. + # Prefer sys.maxint for Python 2.3, which didn't have float('inf') + test_gc.compat_co_firstlineno = getattr(sys, 'maxint', None) or float('inf') def prefix(self): return self.script_name.rstrip("/") |
