Package cherrypy :: Package test
[hide private]
[frames] | no frames]

Source Code for Package cherrypy.test

 1  """Regression test suite for CherryPy. 
 2   
 3  Run 'nosetests -s test/' to exercise all tests. 
 4   
 5  The '-s' flag instructs nose to output stdout messages, wihch is crucial to 
 6  the 'interactive' mode of webtest.py. If you run these tests without the '-s' 
 7  flag, don't be surprised if the test seems to hang: it's waiting for your 
 8  interactive input. 
 9  """ 
10   
11  import os 
12  import sys 
13   
14   
15 -def newexit():
16 os._exit(1)
17 18
19 -def setup():
20 # We want to monkey patch sys.exit so that we can get some 21 # information about where exit is being called. 22 newexit._old = sys.exit 23 sys.exit = newexit
24 25
26 -def teardown():
27 try: 28 sys.exit = sys.exit._old 29 except AttributeError: 30 sys.exit = sys._exit
31