mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
Porting zerobin to python 3
This commit is contained in:
30
libs/cherrypy/test/__init__.py
Normal file
30
libs/cherrypy/test/__init__.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""Regression test suite for CherryPy.
|
||||
|
||||
Run 'nosetests -s test/' to exercise all tests.
|
||||
|
||||
The '-s' flag instructs nose to output stdout messages, wihch is crucial to
|
||||
the 'interactive' mode of webtest.py. If you run these tests without the '-s'
|
||||
flag, don't be surprised if the test seems to hang: it's waiting for your
|
||||
interactive input.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def newexit():
|
||||
os._exit(1)
|
||||
|
||||
|
||||
def setup():
|
||||
# We want to monkey patch sys.exit so that we can get some
|
||||
# information about where exit is being called.
|
||||
newexit._old = sys.exit
|
||||
sys.exit = newexit
|
||||
|
||||
|
||||
def teardown():
|
||||
try:
|
||||
sys.exit = sys.exit._old
|
||||
except AttributeError:
|
||||
sys.exit = sys._exit
|
||||
Reference in New Issue
Block a user