From 7f53916e61839c18b3e06f56e898f1df55afed1d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 20 Oct 2009 11:59:35 -0400 Subject: More exception flow testing. This stuff is kind of involved... --- coverage/control.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'coverage/control.py') 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) -- cgit v1.2.1