diff options
author | Robert Brewer <fumanchu@aminus.org> | 2005-07-18 23:01:35 +0000 |
---|---|---|
committer | Robert Brewer <fumanchu@aminus.org> | 2005-07-18 23:01:35 +0000 |
commit | 3a3976e6936a3c89144662d9d9301e3202835b2b (patch) | |
tree | 60352c0141b5fbf2eb5d9656e3098160e6007c0e /cherrypy/lib/covercp.py | |
parent | fc87150743286a506b46f2492c4f35e4ea15c378 (diff) | |
download | cherrypy-git-3a3976e6936a3c89144662d9d9301e3202835b2b.tar.gz |
1. Pulled dict_from_config_file out of config._load to make it reusable.
2. Made test.test.main() reusable by CP apps.
Diffstat (limited to 'cherrypy/lib/covercp.py')
-rw-r--r-- | cherrypy/lib/covercp.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cherrypy/lib/covercp.py b/cherrypy/lib/covercp.py index 1800b8e2..241eee20 100644 --- a/cherrypy/lib/covercp.py +++ b/cherrypy/lib/covercp.py @@ -28,6 +28,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """Code-coverage tools for CherryPy. +To use this module, or the coverage tools in the test suite, +you need to download 'coverage.py', either Gareth Rees' original +implementation: +http://www.garethrees.org/2001/12/04/python-coverage/ + +or Ned Batchelder's enhanced version: +http://www.nedbatchelder.com/code/modules/coverage.html + Set "cherrypy.codecoverage = True" to turn on coverage tracing. Then, use the serve() function to browse the results in a web browser. If you run this module from the command line, it will call serve() for you. @@ -50,8 +58,10 @@ try: coverage.start() except ImportError: - # This will raise errors that need to be trapped downstream + # Setting coverage to None will raise errors + # that need to be trapped downstream. coverage = None + import warnings warnings.warn("No code coverage will be performed; coverage.py could not be imported.") |