diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-12-31 11:23:01 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-12-31 11:58:08 -0500 |
commit | 957e6a6f17a9eb8eea51be972052fcd98ff7a2fd (patch) | |
tree | 459f7bfcef66c16640b4f434910894bb84b77c58 | |
parent | 14b76135d39bbb11e42a49565396b13d020dd87a (diff) | |
download | python-coveragepy-git-957e6a6f17a9eb8eea51be972052fcd98ff7a2fd.tar.gz |
Adjust other env.PYPY tests to the latest way
-rw-r--r-- | tests/conftest.py | 2 | ||||
-rw-r--r-- | tests/test_phystokens.py | 2 | ||||
-rw-r--r-- | tests/test_process.py | 5 | ||||
-rw-r--r-- | tests/test_summary.py | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 3c6672dc..82a6b0f2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -40,7 +40,7 @@ def set_warnings(): category=DeprecationWarning, message=".* instead of inspect.getfullargspec", ) - if env.PYPY and env.PY3: + if env.PYPY3: # pypy3 warns about unclosed files a lot. warnings.filterwarnings("ignore", r".*unclosed file", category=ResourceWarning) diff --git a/tests/test_phystokens.py b/tests/test_phystokens.py index 48f8ebb7..6f38fc94 100644 --- a/tests/test_phystokens.py +++ b/tests/test_phystokens.py @@ -135,7 +135,7 @@ class SourceEncodingTest(CoverageTest): ) def test_detect_source_encoding_not_in_comment(self): - if env.PYPY and env.PY3: # pragma: no metacov + 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.") diff --git a/tests/test_process.py b/tests/test_process.py index 29fbfb35..3e12c108 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -745,9 +745,8 @@ class ProcessTest(CoverageTest): if env.JYTHON: # Jython as of 2.7.1rc3 won't compile a filename that isn't utf8. self.skipTest("Jython can't handle this test") - if env.PYPY and env.PY3 and env.PYPYVERSION[:3] >= (7, 1, 1): # pragma: obscure - # https://bitbucket.org/pypy/pypy/issues/3074/compile-fails-on-non-ascii-filename-if - self.skipTest("Avoid getfilesystemencoding problem on pypy3") + if env.PYPY3 and env.PYPYVERSION >= (7, 1, 1): # pragma: obscure + self.xfail("https://bitbucket.org/pypy/pypy/issues/3074") # LANG=C forces getfilesystemencoding on Linux to 'ascii', which causes # failures with non-ascii file names. We don't want to make a real file # with strange characters, though, because that gets the test runners diff --git a/tests/test_summary.py b/tests/test_summary.py index 8a59a7ed..ab6414af 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -731,7 +731,7 @@ class SummaryTest(UsingModulesMixin, CoverageTest): def test_missing_py_file_during_run(self): # PyPy2 doesn't run bare .pyc files. - if env.PYPY and env.PY2: + if env.PYPY2: self.skipTest("PyPy2 doesn't run bare .pyc files") # Create two Python files. |