DebugClients/Python/coverage/results.py

changeset 5051
3586ebd9fac8
parent 4491
0d8612e24fef
--- a/DebugClients/Python/coverage/results.py	Sat Jul 23 13:33:54 2016 +0200
+++ b/DebugClients/Python/coverage/results.py	Sun Jul 24 12:01:01 2016 +0200
@@ -30,9 +30,7 @@
             self.no_branch = self.file_reporter.no_branch_lines()
             n_branches = self.total_branches()
             mba = self.missing_branch_arcs()
-            n_partial_branches = sum(
-                len(v) for k,v in iitems(mba) if k not in self.missing
-                )
+            n_partial_branches = sum(len(v) for k,v in iitems(mba) if k not in self.missing)
             n_missing_branches = sum(len(v) for k,v in iitems(mba))
         else:
             self._arc_possibilities = []
@@ -48,7 +46,7 @@
             n_branches=n_branches,
             n_partial_branches=n_partial_branches,
             n_missing_branches=n_missing_branches,
-            )
+        )
 
     def missing_formatted(self):
         """The missing line numbers, formatted nicely.
@@ -84,7 +82,7 @@
         return sorted(missing)
 
     def arcs_missing_formatted(self):
-        """ The missing branch arcs, formatted nicely.
+        """The missing branch arcs, formatted nicely.
 
         Returns a string like "1->2, 1->3, 16->20". Omits any mention of
         branches from missing lines, so if line 17 is missing, then 17->18
@@ -98,7 +96,7 @@
         for line, exits in line_exits:
             for ex in sorted(exits):
                 if line not in missing:
-                    pairs.append('%d->%d' % (line, ex))
+                    pairs.append("%d->%s" % (line, (ex if ex > 0 else "exit")))
         return ', '.join(pairs)
 
     def arcs_unpredicted(self):

eric ide

mercurial