Module helper
source code
A library of helper functions for the CherryPy test suite.
The actual script that runs the entire CP test suite is called
"test.py" (in this folder); test.py calls this module as a
library.
Usage
Each individual test_*.py module imports this module (helper),
usually to make an instance of CPWebCase, and then call testmain().
The CP test suite script (test.py) imports this module and calls
run_test_suite, possibly more than once. CP applications may also
import test.py (to use TestHarness), which then calls helper.py.
|
setConfig(conf)
Set the global config using a copy of conf. |
source code
|
|
|
|
|
sync_apps(profile=False,
validate=False,
conquer=False) |
source code
|
|
|
|
|
testmain(conf=None)
Run __main__ as a test module, with webtest debugging. |
source code
|
|
|
|
|
thisdir = ' /tmp/buildd/cherrypy3-3.1.2/cherrypy/test '
|
|
CPTestLoader = webtest.ReloadingTestLoader()
|
|
CPTestRunner = webtest.TerseTestRunner(verbosity= 2)
|
|
__package__ = ' cherrypy.test '
|
Run the given test modules using the given server and [global]
conf.
The server is started and stopped once, regardless of the number of
test modules. The config, however, is reset for each module.
|