diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2011-03-15 18:43:42 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-03-15 18:43:42 -0400 |
commit | 26165a1a237c2347bae9e1ed588c3ae5f6774cda (patch) | |
tree | d514b47b5cb86f84bf5b3a9e5af9df00c9ed7079 /test/test_coverage.py | |
parent | bdd144d86aacc204d7808cb9392a7a06aaeb624a (diff) | |
download | python-coveragepy-git-26165a1a237c2347bae9e1ed588c3ae5f6774cda.tar.gz |
Backed out changeset c6083fae29bf
I don't know what I want to do with this wacky test yet.
Diffstat (limited to 'test/test_coverage.py')
-rw-r--r-- | test/test_coverage.py | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/test/test_coverage.py b/test/test_coverage.py index 5c35e12c..4d3c37f5 100644 --- a/test/test_coverage.py +++ b/test/test_coverage.py @@ -403,34 +403,35 @@ class SimpleStatementTest(CoverageTest): """, [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 - - 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], "") + 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], "") def test_import(self): self.check_coverage("""\ |