summaryrefslogtreecommitdiff
path: root/tests/test_coverage.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-12-24 21:42:37 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-12-24 21:42:37 -0500
commitdd5f8a759843724eaf278a7fa10f6b905d955b34 (patch)
tree8b19ba7325fe03fae1822a008119e7ccebf6bcce /tests/test_coverage.py
parent1511a0f9870f39c02b3af75cd22ed4882215e1f1 (diff)
downloadpython-coveragepy-git-dd5f8a759843724eaf278a7fa10f6b905d955b34.tar.gz
if 0: might not do what we want, use a non-constant
Diffstat (limited to 'tests/test_coverage.py')
-rw-r--r--tests/test_coverage.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_coverage.py b/tests/test_coverage.py
index 02da2032..0e5f495a 100644
--- a/tests/test_coverage.py
+++ b/tests/test_coverage.py
@@ -1150,19 +1150,19 @@ class ExcludeTest(CoverageTest):
self.check_coverage("""\
a = 1; b = 2
- if 0:
+ if len([]): # not-here
a = 4
b = 5
c = 6
assert a == 1 and b == 2
""",
- [1,7], "", excludes=['if 0:'])
+ [1,7], "", excludes=['not-here'])
def test_excluding_if_but_not_else_suite(self):
self.check_coverage("""\
a = 1; b = 2
- if 0:
+ if len([]): # not-here
a = 4
b = 5
c = 6
@@ -1171,7 +1171,7 @@ class ExcludeTest(CoverageTest):
b = 9
assert a == 8 and b == 9
""",
- [1,8,9,10], "", excludes=['if 0:'])
+ [1,8,9,10], "", excludes=['not-here'])
def test_excluding_else_suite(self):
self.check_coverage("""\
@@ -1230,7 +1230,7 @@ class ExcludeTest(CoverageTest):
self.check_coverage("""\
def foo():
a = 2
- if 0: x = 3 # no cover
+ if len([]): x = 3 # no cover
b = 4
foo()