summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_api.py23
-rw-r--r--tests/test_arcs.py18
-rw-r--r--tests/test_coverage.py52
3 files changed, 46 insertions, 47 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index a7cadab3..3ea5b3ef 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -278,18 +278,17 @@ class ApiTest(CoverageTest):
self.start_import_stop(cov, "code2")
self.check_code1_code2(cov)
- if 0: # expected failure
- # for https://bitbucket.org/ned/coveragepy/issue/79
- def test_start_save_stop(self):
- self.make_code1_code2()
- cov = coverage.Coverage()
- cov.start()
- self.import_local_file("code1")
- cov.save()
- self.import_local_file("code2")
- cov.stop()
-
- self.check_code1_code2(cov)
+ def test_start_save_stop(self):
+ self.skip("Expected failure: https://bitbucket.org/ned/coveragepy/issue/79")
+ self.make_code1_code2()
+ cov = coverage.Coverage()
+ cov.start()
+ self.import_local_file("code1")
+ cov.save()
+ self.import_local_file("code2")
+ cov.stop()
+
+ self.check_code1_code2(cov)
def make_corrupt_data_files(self):
"""Make some good and some bad data files."""
diff --git a/tests/test_arcs.py b/tests/test_arcs.py
index df303d8b..18b18fdb 100644
--- a/tests/test_arcs.py
+++ b/tests/test_arcs.py
@@ -140,15 +140,15 @@ class SimpleArcTest(CoverageTest):
arcz=".1 16 6. .2 23 3. 25 5.", arcz_missing="25 5."
)
- if 0: # expected failure
- def test_unused_lambdas_are_confusing_bug_90(self):
- self.check_coverage("""\
- a = 1
- fn = lambda x: x
- b = 3
- """,
- arcz=".1 12 .2 2-2 23 3."
- )
+ def test_unused_lambdas_are_confusing_bug_90(self):
+ self.skip("Expected failure: bug 90")
+ self.check_coverage("""\
+ a = 1
+ fn = lambda x: x
+ b = 3
+ """,
+ arcz=".1 12 .2 2-2 23 3."
+ )
class WithTest(CoverageTest):
diff --git a/tests/test_coverage.py b/tests/test_coverage.py
index 0e5f495a..ab4faf55 100644
--- a/tests/test_coverage.py
+++ b/tests/test_coverage.py
@@ -403,35 +403,35 @@ class SimpleStatementTest(CoverageTest):
""",
[1,2,3,4,5], "4")
- if 0: # expected failure
+ def test_strange_unexecuted_continue(self):
# 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], "")
+ self.skip("Expected failure: peephole optimization of jumps to jumps")
+ 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("""\