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
commit7f53916e61839c18b3e06f56e898f1df55afed1d (patch)
treef39577426803b0cd4661fe732c3d02fb9cce14f3 /coverage/control.py
parent832ee468e711e6d33fb49fb718e60a85c970a8ef (diff)
downloadpython-coveragepy-git-7f53916e61839c18b3e06f56e898f1df55afed1d.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 5e857aa6..da773d3e 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)