summaryrefslogtreecommitdiff
path: root/tests/coveragetest.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-02-19 21:14:55 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-02-19 21:14:55 -0500
commit3e901194d5fa45ede0bf23f20a407f242b6f56d8 (patch)
treecf53e7c7a22f0730414a865d6e50fec6e8d4f780 /tests/coveragetest.py
parentba65cc0d4f6e1d6757b2cb3fd43e8f488b68bf7d (diff)
downloadpython-coveragepy-3e901194d5fa45ede0bf23f20a407f242b6f56d8.tar.gz
Don't report negative line numbers through get_line_data
Diffstat (limited to 'tests/coveragetest.py')
-rw-r--r--tests/coveragetest.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py
index cf3d247..0e80f4a 100644
--- a/tests/coveragetest.py
+++ b/tests/coveragetest.py
@@ -166,6 +166,8 @@ class CoverageTest(
`arcs_unpredicted` are the arcs executed in the code, but not deducible
from the code.
+ Returns the Coverage object, in case you want to poke at it some more.
+
"""
# We write the code into a file so that we can import it.
# Coverage wants to deal with things as modules with file names.
@@ -248,6 +250,8 @@ class CoverageTest(
rep = " ".join(frep.getvalue().split("\n")[2].split()[1:])
self.assertEqual(report, rep)
+ return cov
+
def nice_file(self, *fparts):
"""Canonicalize the filename composed of the parts in `fparts`."""
fname = os.path.join(*fparts)