diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-02-06 21:55:29 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-02-06 21:57:26 -0500 |
commit | 2af7e87b26754fea68adfd1b8aa51052d987e60c (patch) | |
tree | 3d81d1e79bebd529240629b9cd43c4f0e273046b /tests/test_phystokens.py | |
parent | e59da1bafafe4265188bb5c75c4e557dfbd47d90 (diff) | |
download | python-coveragepy-git-nedbat/better-combine-action.tar.gz |
refactor: convert all skipping to pytest skipsnedbat/better-combine-action
Diffstat (limited to 'tests/test_phystokens.py')
-rw-r--r-- | tests/test_phystokens.py | 6 |
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 |