Ned Batchelder avatar Ned Batchelder committed 0d64a24

Backed out changeset c6083fae29bf
I don't know what I want to do with this wacky test yet.

Comments (0)

Files changed (1)

test/test_coverage.py

             """,
             [1,2,3,4,5], "4")
 
-    # Peephole optimization of jumps to jumps can mean that some statements
-    # never hit the line tracer.  The behavior is different in different
-    # versions of Python, so don't run this test:
-    def test_strange_unexecuted_continue(self):
-        self.check_coverage("""\
-            a = b = c = 0
-            for n in range(100):
-                if n % 2:
-                    if n % 4:
-                        a += 1
-                    continue    # <-- This line may not be hit.
-                else:
-                    b += 1
-                c += 1
-            assert a == 50 and b == 50 and c == 50
+    if 0:
+        # Peephole optimization of jumps to jumps can mean that some statements
+        # never hit the line tracer.  The behavior is different in different
+        # versions of Python, so don't run this test:
+        def test_strange_unexecuted_continue(self):
+            self.check_coverage("""\
+                a = b = c = 0
+                for n in range(100):
+                    if n % 2:
+                        if n % 4:
+                            a += 1
+                        continue    # <-- This line may not be hit.
+                    else:
+                        b += 1
+                    c += 1
+                assert a == 50 and b == 50 and c == 50
 
-            a = b = c = 0
-            for n in range(100):
-                if n % 2:
-                    if n % 3:
-                        a += 1
-                    continue    # <-- This line is always hit.
-                else:
-                    b += 1
-                c += 1
-            assert a == 33 and b == 50 and c == 50
-            """,
-            [1,2,3,4,5,6,8,9,10, 12,13,14,15,16,17,19,20,21], "")
+                a = b = c = 0
+                for n in range(100):
+                    if n % 2:
+                        if n % 3:
+                            a += 1
+                        continue    # <-- This line is always hit.
+                    else:
+                        b += 1
+                    c += 1
+                assert a == 33 and b == 50 and c == 50
+                """,
+                [1,2,3,4,5,6,8,9,10, 12,13,14,15,16,17,19,20,21], "")
 
     def test_import(self):
         self.check_coverage("""\
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.