diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-01-15 07:30:20 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-01-15 14:01:33 -0500 |
commit | 41f1e0c7075b3b9ab73f1628559bc919d5de3775 (patch) | |
tree | b4e57810194c79fdad5d96f54f1e2087294b4c5c | |
parent | 73d4c5695eee4ee5f57c4cc1ad4b23d90adc6a6f (diff) | |
download | python-coveragepy-git-41f1e0c7075b3b9ab73f1628559bc919d5de3775.tar.gz |
test: skip tests suffering from bpo 46389 (3.11)
-rw-r--r-- | tests/test_arcs.py | 8 | ||||
-rw-r--r-- | tests/test_process.py | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py index d39b2f2a..35c1ed3e 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -1234,6 +1234,10 @@ class YieldTest(CoverageTest): arcz=".1 14 45 54 4. .2 2. -22 2-2", ) + @pytest.mark.skipif( + (3, 11, 0, "alpha", 4) <= env.PYVERSION, + reason="avoid a 3.11 bug: https://bugs.python.org/issue46389", + ) def test_bug_324(self): # This code is tricky: the list() call pulls all the values from gen(), # but each of them is a generator itself that is never iterated. As a @@ -1620,6 +1624,10 @@ class MiscArcTest(CoverageTest): self.check_coverage(code, arcs=[(-1, 1), (1, 2*n+4), (2*n+4, -1)]) assert self.stdout() == f"{n}\n" + @pytest.mark.skipif( + (3, 11, 0, "alpha", 4) <= env.PYVERSION, + reason="avoid a 3.11 bug: https://bugs.python.org/issue46389", + ) def test_partial_generators(self): # https://github.com/nedbat/coveragepy/issues/475 # Line 2 is executed completely. diff --git a/tests/test_process.py b/tests/test_process.py index 8bbfe99c..f13fe014 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -552,6 +552,10 @@ class ProcessTest(CoverageTest): @pytest.mark.expensive @pytest.mark.skipif(not env.C_TRACER, reason="fullcoverage only works with the C tracer.") @pytest.mark.skipif(env.METACOV, reason="Can't test fullcoverage when measuring ourselves") + @pytest.mark.skipif( + (3, 11, 0, "alpha", 4) <= env.PYVERSION, + reason="avoid 3.11 bug lineno==None: https://bugs.python.org/issue46389", + ) 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 @@ -561,9 +565,7 @@ class ProcessTest(CoverageTest): print("FOOEY == %s" % os.getenv("FOOEY")) """) - fullcov = os.path.join( - os.path.dirname(coverage.__file__), "fullcoverage" - ) + fullcov = os.path.join(os.path.dirname(coverage.__file__), "fullcoverage") self.set_environ("FOOEY", "BOO") self.set_environ("PYTHONPATH", fullcov) out = self.run_command("python -X frozen_modules=off -m coverage run -L getenv.py") |