summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-11-27 08:17:17 -0500
committerNed Batchelder <ned@nedbatchelder.com>2014-11-27 08:17:17 -0500
commita8f8bb898ac35acd493524d470223319b2271f4a (patch)
tree0c7304d584f67a10ee07d721e334303c43dacc80 /tests
parentc44bbcd1d86e6c4192988f20319d9e3c94e263b6 (diff)
downloadpython-coveragepy-git-a8f8bb898ac35acd493524d470223319b2271f4a.tar.gz
Accept more kinds of whitespace in pragmas. #334
Diffstat (limited to 'tests')
-rw-r--r--tests/test_arcs.py6
-rw-r--r--tests/test_coverage.py4
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py
index 80923f8d..3856a2cf 100644
--- a/tests/test_arcs.py
+++ b/tests/test_arcs.py
@@ -587,9 +587,11 @@ class ExcludeTest(CoverageTest):
if c: # pragma NOBRANCH
d = 6
e = 7
+ if e:#\tpragma:\tno branch
+ f = 9
""",
- [1,2,3,4,5,6,7],
- arcz=".1 12 23 24 34 45 56 57 67 7.", arcz_missing="")
+ [1,2,3,4,5,6,7,8,9],
+ arcz=".1 12 23 24 34 45 56 57 67 78 89 9. 8.", arcz_missing="")
def test_custom_pragmas(self):
self.check_coverage("""\
diff --git a/tests/test_coverage.py b/tests/test_coverage.py
index 565fa4e1..b69fd986 100644
--- a/tests/test_coverage.py
+++ b/tests/test_coverage.py
@@ -1113,8 +1113,10 @@ class ExcludeTest(CoverageTest):
c = 3
d = 4 #pragma NOCOVER
e = 5
+ f = 6#\tpragma:\tno cover
+ g = 7
""",
- [1,3,5]
+ [1,3,5,7]
)
def test_simple(self):