diff options
-rw-r--r-- | coverage/sqldata.py | 3 | ||||
-rw-r--r-- | tests/test_arcs.py | 4 | ||||
-rw-r--r-- | tests/test_concurrency.py | 10 |
3 files changed, 15 insertions, 2 deletions
diff --git a/coverage/sqldata.py b/coverage/sqldata.py index e136c7f6..5e27cd85 100644 --- a/coverage/sqldata.py +++ b/coverage/sqldata.py @@ -497,6 +497,9 @@ class CoverageData(SimpleReprMixin): self._set_context_id() for filename, arcs in arc_data.items(): file_id = self._file_id(filename, add=True) + from coverage import env + if env.PYVERSION == (3, 11, 0, "alpha", 4, 0): + arcs = [(a, b) for a, b in arcs if a is not None and b is not None] data = [(file_id, self._current_context_id, fromno, tono) for fromno, tono in arcs] con.executemany( "insert or ignore into arc " + diff --git a/tests/test_arcs.py b/tests/test_arcs.py index 850a0a38..6cb997dc 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -1234,7 +1234,7 @@ class YieldTest(CoverageTest): arcz=".1 14 45 54 4. .2 2. -22 2-2", ) - @pytest.mark.xfail( + @pytest.mark.skipif( ((3, 11, 0, "alpha", 4, 0) == env.PYVERSION) and not env.C_TRACER, reason="avoid a 3.11 bug: https://bugs.python.org/issue46389", ) @@ -1623,7 +1623,7 @@ 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.xfail( + @pytest.mark.skipif( ((3, 11, 0, "alpha", 4, 0) == env.PYVERSION) and not env.C_TRACER, reason="avoid a 3.11 bug: https://bugs.python.org/issue46389", ) diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py index bfdf13d4..1e919e3b 100644 --- a/tests/test_concurrency.py +++ b/tests/test_concurrency.py @@ -496,6 +496,11 @@ class MultiprocessingTest(CoverageTest): last_line = self.squeezed_lines(out)[-1] assert re.search(r"TOTAL \d+ 0 100%", last_line) + @pytest.mark.skipif( + ((3, 11, 0, "alpha", 4, 0) == env.PYVERSION), + #((3, 11, 0, "alpha", 4, 0) == env.PYVERSION) and not env.C_TRACER and env.METACOV, + reason="avoid a 3.11 bug: https://bugs.python.org/issue46389", + ) def test_multiprocessing_simple(self, start_method): nprocs = 3 upto = 30 @@ -510,6 +515,11 @@ class MultiprocessingTest(CoverageTest): start_method=start_method, ) + @pytest.mark.skipif( + ((3, 11, 0, "alpha", 4, 0) == env.PYVERSION), + #((3, 11, 0, "alpha", 4, 0) == env.PYVERSION) and not env.C_TRACER and env.METACOV, + reason="avoid a 3.11 bug: https://bugs.python.org/issue46389", + ) def test_multiprocessing_append(self, start_method): nprocs = 3 upto = 30 |