diff options
-rw-r--r-- | tests/test_coverage.py | 10 | ||||
-rw-r--r-- | tests/test_parser.py | 2 |
2 files changed, 6 insertions, 6 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() diff --git a/tests/test_parser.py b/tests/test_parser.py index 44a261d9..2a4c88a7 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -81,7 +81,7 @@ class PythonParserTest(CoverageTest): def __init__(self): pass - if 0: # nocover + if len([]): # nocover class Bar: pass """) |