eric7/DebugClients/Python/coverage/results.py

branch
eric7
changeset 8527
2bd1325d727e
parent 8312
800c432b34c8
child 8775
0802ae193343
--- a/eric7/DebugClients/Python/coverage/results.py	Fri Aug 20 19:56:17 2021 +0200
+++ b/eric7/DebugClients/Python/coverage/results.py	Sat Aug 21 14:21:44 2021 +0200
@@ -146,10 +146,7 @@
         stats = {}
         for lnum in self._branch_lines():
             exits = self.exit_counts[lnum]
-            try:
-                missing = len(missing_arcs[lnum])
-            except KeyError:
-                missing = 0
+            missing = len(missing_arcs[lnum])
             stats[lnum] = (exits, exits - missing)
         return stats
 
@@ -265,7 +262,7 @@
         # Implementing 0+Numbers allows us to sum() a list of Numbers.
         if other == 0:
             return self
-        return NotImplemented
+        return NotImplemented       # pragma: not covered (we never call it this way)
 
 
 def _line_ranges(statements, lines):
@@ -315,7 +312,7 @@
         line_exits = sorted(arcs)
         for line, exits in line_exits:
             for ex in sorted(exits):
-                if line not in lines:
+                if line not in lines and ex not in lines:
                     dest = (ex if ex > 0 else "exit")
                     line_items.append((line, "%d->%s" % (line, dest)))
 

eric ide

mercurial