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 | ad8321bd6d874ce43666c9cb69a7a664776a07fa (patch) | |
tree | 7b84c108652247d0eb02b71bf89651c32a41a1db /coverage/python.py | |
parent | 355ff443a4ec45078fa26dc7dfbb4026f6862f15 (diff) | |
download | python-coveragepy-ad8321bd6d874ce43666c9cb69a7a664776a07fa.tar.gz |
Add arc_destination_description so we can next make better descriptions
Diffstat (limited to 'coverage/python.py')
-rw-r--r-- | coverage/python.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/coverage/python.py b/coverage/python.py index 07d2347..f50d4d9 100644 --- a/coverage/python.py +++ b/coverage/python.py @@ -165,6 +165,12 @@ class PythonFileReporter(FileReporter): def exit_counts(self): return self.parser.exit_counts() + def arc_destination_description(self, lineno): + if lineno < 0: + return "jump to the function exit" + else: + return "jump to line {lineno}".format(lineno=lineno) + @contract(returns='unicode') def source(self): if self._source is None: |