summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-09-26 20:08:24 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-09-26 20:08:24 -0400
commitecf5b0dfcf5b15d8325666beed0c101efc35ec23 (patch)
treec84d662dbd398602696e573aa03c483ff456b8bb /coverage
parent13a69926134a926ea047d91bff06865bd5097a04 (diff)
downloadpython-coveragepy-git-ecf5b0dfcf5b15d8325666beed0c101efc35ec23.tar.gz
HTML report includes non-relative code units also. Fixes issue #11, though the paths displayed in the HTML are kind of heinous.
Diffstat (limited to 'coverage')
-rw-r--r--coverage/annotate.py3
-rw-r--r--coverage/report.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/coverage/annotate.py b/coverage/annotate.py
index 3cbe2407..3130c001 100644
--- a/coverage/annotate.py
+++ b/coverage/annotate.py
@@ -43,6 +43,9 @@ class AnnotateReporter(Reporter):
`cu` is the CodeUnit for the file to annotate.
"""
+ if not cu.relative:
+ return
+
filename = cu.filename
source = cu.source_file()
if self.directory:
diff --git a/coverage/report.py b/coverage/report.py
index 561973b5..0ae4ce64 100644
--- a/coverage/report.py
+++ b/coverage/report.py
@@ -50,8 +50,6 @@ class Reporter(object):
for cu in self.code_units:
try:
- if not cu.relative:
- continue
statements, excluded, missing, _ = self.coverage._analyze(cu)
report_fn(cu, statements, excluded, missing)
except KeyboardInterrupt: