From ad8321bd6d874ce43666c9cb69a7a664776a07fa Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 4 Feb 2016 22:56:23 -0500 Subject: Add arc_destination_description so we can next make better descriptions --- coverage/python.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'coverage/python.py') 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: -- cgit v1.2.1