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/plugin.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'coverage/plugin.py') 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`. -- cgit v1.2.1