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
commitc42d59368950e072056da5ba1c34aceac3d7f1f3 (patch)
treebd01105e01acef7278eda72e4a5cee4934b4c0e8 /tests/coveragetest.py
parent7ed2d4c4d61474912eb5bda718dbacd8a03dc635 (diff)
downloadpython-coveragepy-git-c42d59368950e072056da5ba1c34aceac3d7f1f3.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 cf3d2474..0e80f4a9 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)