diff options
author | Michael Robinson <none@none> | 2005-07-07 19:29:15 +0000 |
---|---|---|
committer | Michael Robinson <none@none> | 2005-07-07 19:29:15 +0000 |
commit | 5875a19e80ea0dbbe40796a1df270a25ddd64d2b (patch) | |
tree | 3e02dc03691c34d8a8c054a331eabe17e2ef2fb7 /cherrypy/lib/covercp.py | |
parent | b5a94a60a5dbfa3d6c02405ef064ac1ef10ca018 (diff) | |
download | cherrypy-git-5875a19e80ea0dbbe40796a1df270a25ddd64d2b.tar.gz |
config.update: fixed default overide value, fixed newlines in covercp.py
Diffstat (limited to 'cherrypy/lib/covercp.py')
-rw-r--r-- | cherrypy/lib/covercp.py | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/cherrypy/lib/covercp.py b/cherrypy/lib/covercp.py index eb264a7c..1800b8e2 100644 --- a/cherrypy/lib/covercp.py +++ b/cherrypy/lib/covercp.py @@ -74,19 +74,19 @@ class CoverStats(object): def menu(self): yield "<h2>CherryPy Coverage</h2>" - yield "<p>Click on one of the modules below to see coverage analysis.</p>"
- coverage.get_ready()
- runs = [os.path.split(x) for x in coverage.cexecuted.keys()]
- runs.sort()
- if runs:
- base = ""
- for x in runs:
- newbase, fname = x
- if base != newbase:
- base = newbase
- yield "<h3>%s</h3>\n" % newbase
- yield ("<a href='report?name=%s' target='main'>%s</a><br />\n"
- % (os.path.join(newbase, fname), fname))
+ yield "<p>Click on one of the modules below to see coverage analysis.</p>" + coverage.get_ready() + runs = [os.path.split(x) for x in coverage.cexecuted.keys()] + runs.sort() + if runs: + base = "" + for x in runs: + newbase, fname = x + if base != newbase: + base = newbase + yield "<h3>%s</h3>\n" % newbase + yield ("<a href='report?name=%s' target='main'>%s</a><br />\n" + % (os.path.join(newbase, fname), fname)) menu.exposed = True def annotated_file(self, filename, statements, excluded, missing): @@ -133,16 +133,16 @@ class CoverStats(object): return result def report(self, name): - import cherrypy
- cherrypy.response.headerMap['Content-Type'] = 'text/plain'
- filename, statements, excluded, missing, _ = coverage.analysis2(name)
- return self.annotated_file(filename, statements, excluded, missing)
+ import cherrypy + cherrypy.response.headerMap['Content-Type'] = 'text/plain' + filename, statements, excluded, missing, _ = coverage.analysis2(name) + return self.annotated_file(filename, statements, excluded, missing) report.exposed = True -
+ def serve(path=localFile, port=8080): - if coverage is None:
- raise ImportError("<p>The coverage module could not be imported.</p>")
+ if coverage is None: + raise ImportError("<p>The coverage module could not be imported.</p>") coverage.cache_default = path import cherrypy |