diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-02-04 22:56:23 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-02-04 22:56:23 -0500 |
commit | 5eeccec6a6113b9e2537d7d8716a7d580a4952c7 (patch) | |
tree | 39ed6893d1fdf0b58fff71fbb2461c3af70749ec /coverage/plugin.py | |
parent | f455bd80cf7c8b4cb1cbda494f48d0a3dc710da0 (diff) | |
download | python-coveragepy-git-5eeccec6a6113b9e2537d7d8716a7d580a4952c7.tar.gz |
Add arc_destination_description so we can next make better descriptions
Diffstat (limited to 'coverage/plugin.py')
-rw-r--r-- | coverage/plugin.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/coverage/plugin.py b/coverage/plugin.py index f870c254..095b268c 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`. |