summaryrefslogtreecommitdiff
path: root/coverage/plugin.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-02-04 22:56:23 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-02-04 22:56:23 -0500
commitad8321bd6d874ce43666c9cb69a7a664776a07fa (patch)
tree7b84c108652247d0eb02b71bf89651c32a41a1db /coverage/plugin.py
parent355ff443a4ec45078fa26dc7dfbb4026f6862f15 (diff)
downloadpython-coveragepy-ad8321bd6d874ce43666c9cb69a7a664776a07fa.tar.gz
Add arc_destination_description so we can next make better descriptions
Diffstat (limited to 'coverage/plugin.py')
-rw-r--r--coverage/plugin.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/coverage/plugin.py b/coverage/plugin.py
index f870c25..095b268 100644
--- a/coverage/plugin.py
+++ b/coverage/plugin.py
@@ -329,6 +329,21 @@ class FileReporter(object):
"""
return {}
+ def arc_destination_description(self, lineno):
+ """Provide an English phrase describing an arc destination.
+
+ For an arc like (123, 456), it should read well to use the phrase like
+ this::
+
+ "Line {0} didn't {1}".format(123, arc_destination_description(456))
+
+ TODO: say more.
+
+ By default, this simply returns the string "jump to {lineno}".
+
+ """
+ return "jump to line {lineno}".format(lineno=lineno)
+
def source_token_lines(self):
"""Generate a series of tokenized lines, one for each line in `source`.