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

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.

Classes [hide private]
  CPWebCase
Functions [hide private]
 
setConfig(conf)
Set the global config using a copy of conf.
source code
 
run_test_suite(moduleNames, server, conf)
Run the given test modules using the given server and conf.
source code
 
sync_apps(profile=False, validate=False, conquer=False) source code
 
_run_test_suite_thread(moduleNames, conf) source code
 
testmain(conf=None)
Run __main__ as a test module, with webtest debugging.
source code
 
_test_main_thread() source code
Variables [hide private]
  CPTestLoader = webtest.ReloadingTestLoader()
  CPTestRunner = webtest.TerseTestRunner(verbosity= 2)
  __package__ = 'cherrypy.test'
Function Details [hide private]

run_test_suite(moduleNames, server, conf)

source code 

Run the given test modules using the given server and conf.

The server is started and stopped once, regardless of the number of test modules. The config, however, is reset for each module.