summaryrefslogtreecommitdiff
path: root/tests/test_phystokens.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-02-06 21:55:29 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-02-07 17:24:44 -0500
commitc0921466d3d235f10be333da1f9cf523f4e2e24c (patch)
tree5e67f7e62db1048229a54e308885b935616b6e5a /tests/test_phystokens.py
parent465dace54a3f3300c0a86b527a8f77d0475fc895 (diff)
downloadpython-coveragepy-git-c0921466d3d235f10be333da1f9cf523f4e2e24c.tar.gz
refactor: convert all skipping to pytest skips
Diffstat (limited to 'tests/test_phystokens.py')
-rw-r--r--tests/test_phystokens.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test_phystokens.py b/tests/test_phystokens.py
index c7375cb5..86b1fdbe 100644
--- a/tests/test_phystokens.py
+++ b/tests/test_phystokens.py
@@ -132,11 +132,9 @@ class SourceEncodingTest(CoverageTest):
for _, source, expected in ENCODING_DECLARATION_SOURCES:
assert source_encoding(source) == expected, "Wrong encoding in %r" % source
+ # PyPy3 gets this case wrong. Not sure what I can do about it, so skip the test.
+ @pytest.mark.skipif(env.PYPY3, reason="PyPy3 is wrong about non-comment encoding. Skip it.")
def test_detect_source_encoding_not_in_comment(self):
- if env.PYPY3: # pragma: no metacov
- # PyPy3 gets this case wrong. Not sure what I can do about it,
- # so skip the test.
- self.skipTest("PyPy3 is wrong about non-comment encoding. Skip it.")
# Should not detect anything here
source = b'def parse(src, encoding=None):\n pass'
assert source_encoding(source) == DEF_ENCODING