diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-12 20:16:27 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-12 20:16:27 -0500 |
commit | 52efb4de5e9f0ff37eeda9471d7c3aa26edfdd38 (patch) | |
tree | ceb41510bf5bbb38bce4ceea542841f637fb4ae5 /tests/test_process.py | |
parent | b40a80570713461f20a3728cd75db404e99d9a3c (diff) | |
download | python-coveragepy-git-52efb4de5e9f0ff37eeda9471d7c3aa26edfdd38.tar.gz |
test(fix): make the fullcoverage test work on 3.11
It didn't work because the os module is frozen on 3.11, so it gets no
measurement. Use -X to disable the frozen modules feature for the test.
Diffstat (limited to 'tests/test_process.py')
-rw-r--r-- | tests/test_process.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test_process.py b/tests/test_process.py index 58f32707..1e05c560 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -748,8 +748,6 @@ class ProcessTest(CoverageTest): @pytest.mark.expensive @pytest.mark.skipif(env.METACOV, reason="Can't test fullcoverage when measuring ourselves") @pytest.mark.skipif(not env.C_TRACER, reason="fullcoverage only works with the C tracer.") - @pytest.mark.skipif(env.PYVERSION[:2] >= (3, 11), reason="this test needs work on 3.11") - # https://github.com/nedbat/coveragepy/issues/1278 def test_fullcoverage(self): # fullcoverage is a trick to get stdlib modules measured from # the very beginning of the process. Here we import os and @@ -764,7 +762,7 @@ class ProcessTest(CoverageTest): ) self.set_environ("FOOEY", "BOO") self.set_environ("PYTHONPATH", fullcov) - out = self.run_command("python -m coverage run -L getenv.py") + out = self.run_command("python -X frozen_modules=off -m coverage run -L getenv.py") assert out == "FOOEY == BOO\n" data = coverage.CoverageData() data.read() |