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 -def newexit():
15 os._exit(1)
16
17 -def setup():
18 # We want to monkey patch sys.exit so that we can get some 19 # information about where exit is being called. 20 newexit._old = sys.exit 21 sys.exit = newexit
22
23 -def teardown():
24 try: 25 sys.exit = sys.exit._old 26 except AttributeError: 27 sys.exit = sys._exit
28