summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-10-20 11:59:35 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-10-20 11:59:35 -0400
commitc2a1170b310ecb76e4783edffab2a9494274026a (patch)
tree9242ac0e8ee7e6062023c1794d76684f8bd3ad73 /coverage/control.py
parent6fd83c044bb02b67501bfbfb8f2cf878bafdd346 (diff)
downloadpython-coveragepy-c2a1170b310ecb76e4783edffab2a9494274026a.tar.gz
More exception flow testing. This stuff is kind of involved...
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/control.py b/coverage/control.py
index 5e857aa..da773d3 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -384,5 +384,8 @@ class Analysis:
def arcs_unpredicted(self):
possible = self.arc_possibilities()
executed = self.arcs_executed()
- unpredicted = [e for e in executed if e not in possible]
+ # Exclude arcs here which connect a line to itself. They can occur
+ # in executed data in some cases. This is where they can cause trouble,
+ # and here is where it's the least burden to remove them.
+ unpredicted = [e for e in executed if e not in possible and e[0] != e[1]]
return sorted(unpredicted)