diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-05-27 08:56:44 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-05-27 08:56:44 -0400 |
commit | 12a7c074a2109e63c348dce107470bc2371b0a2e (patch) | |
tree | dc3a81741960b820bdd9bc42f325ae687f2121b9 | |
parent | ca6e49360be1b7d25b0ff4c11473063ffc05f1e7 (diff) | |
parent | 92cea9cf6b36f9d60217a4162e3ce40e5f69cbd8 (diff) | |
download | python-coveragepy-git-12a7c074a2109e63c348dce107470bc2371b0a2e.tar.gz |
Merge trunk
-rw-r--r-- | TODO.txt | 3 | ||||
-rw-r--r-- | coverage/control.py | 10 | ||||
-rw-r--r-- | coverage/htmlfiles/pyfile.html | 2 | ||||
-rw-r--r-- | coverage/summary.py | 2 |
4 files changed, 10 insertions, 7 deletions
@@ -62,6 +62,9 @@ x Tricky swapping of collector like figleaf, pycov, et al. (Don't need to do - How will Coverage package install over coverage.py module?
- Support 2.3 - 3.0?
http://pythonology.blogspot.com/2009/02/making-code-run-on-python-20-through-30.html
+ http://www.rfk.id.au/blog/entry/preparing-pyenchant-for-python-3
+ http://pydev.blogspot.com/2008/11/making-code-work-in-python-2-and-3.html
+ - Explicitly set pickle protocol to 2.
- Use a .coveragerc file to control Coverage without the programmatic API.
- An inference mode that marks lines as executed if they "must have been" executed:
class definitions, etc, when coverage is started after the class is defined.
diff --git a/coverage/control.py b/coverage/control.py index ef1a6205..f9d23066 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -186,11 +186,11 @@ class coverage: `morf` is a module or a filename. It will be analyzed to determine its coverage statistics. The return value is a 5-tuple: - * The filename for the module. - * A list of line numbers of executable statements. - * A list of line numbers of excluded statements. - * A list of line numbers of statements not run (missing from execution). - * A readable formatted string of the missing line numbers. + * The filename for the module. + * A list of line numbers of executable statements. + * A list of line numbers of excluded statements. + * A list of line numbers of statements not run (missing from execution). + * A readable formatted string of the missing line numbers. The analysis uses the source file itself and the current measured coverage data. diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html index afcb4a5e..d1810fa1 100644 --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -21,7 +21,7 @@ function toggle_lines(btn, cls) { <body>
<div id='header'>
<div class='content'>
- <h1>Coverage for <b>{{cu.filename|escape}}</b>:
+ <h1>Coverage for <b>{{cu.name|escape}}</b> :
<span class='pc_cov'>{{pc_cov|format_pct}}%</span>
</h1>
<h2 class='stats'>
diff --git a/coverage/summary.py b/coverage/summary.py index 712febc6..916b41e7 100644 --- a/coverage/summary.py +++ b/coverage/summary.py @@ -20,7 +20,7 @@ class SummaryReporter(Reporter): # Prepare the formatting strings max_name = max([len(cu.name) for cu in self.code_units] + [5]) fmt_name = "%%- %ds " % max_name - fmt_err = fmt_name + "%s: %s\n" + fmt_err = "%s %s: %s\n" header = fmt_name % "Name" + " Stmts Exec Cover\n" fmt_coverage = fmt_name + "% 6d % 6d % 5d%%\n" if self.show_missing: |