Skip to content

Commit e5b91eb

Browse files
committed
test: skip tests that fail until CPython #92236 is fixed
python/cpython#92236
1 parent 956f0fd commit e5b91eb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/test_arcs.py

+20
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
from coverage.files import abs_file
1414

1515

16+
skip_cpython_92236 = pytest.mark.skipif(
17+
env.PYVERSION >= (3, 11, 0, "beta"),
18+
reason="Avoid a CPython bug: https://github.com/python/cpython/issues/92236",
19+
# #92236 is fixed in https://github.com/python/cpython/pull/92722
20+
)
21+
1622
class SimpleArcTest(CoverageTest):
1723
"""Tests for coverage.py's arc measurement."""
1824

@@ -605,6 +611,7 @@ def wrong_loop(x):
605611
arcz_missing="26 3. 6.",
606612
)
607613

614+
@skip_cpython_92236
608615
def test_generator_expression(self):
609616
# Generator expression:
610617
self.check_coverage("""\
@@ -617,6 +624,7 @@ def test_generator_expression(self):
617624
arcz=".1 -22 2-2 12 23 34 45 53 3.",
618625
)
619626

627+
@skip_cpython_92236
620628
def test_generator_expression_another_way(self):
621629
# https://bugs.python.org/issue44450
622630
# Generator expression:
@@ -1169,6 +1177,7 @@ def func(x):
11691177
class YieldTest(CoverageTest):
11701178
"""Arc tests for generators."""
11711179

1180+
@skip_cpython_92236
11721181
def test_yield_in_loop(self):
11731182
self.check_coverage("""\
11741183
def gen(inp):
@@ -1180,6 +1189,7 @@ def gen(inp):
11801189
arcz=".1 .2 23 2. 32 15 5.",
11811190
)
11821191

1192+
@skip_cpython_92236
11831193
def test_padded_yield_in_loop(self):
11841194
self.check_coverage("""\
11851195
def gen(inp):
@@ -1200,6 +1210,7 @@ def gen(inp):
12001210
env.PYVERSION[:5] == (3, 11, 0, 'alpha', 3),
12011211
reason="avoid 3.11 bug: bpo46225",
12021212
)
1213+
@skip_cpython_92236
12031214
def test_bug_308(self):
12041215
self.check_coverage("""\
12051216
def run():
@@ -1234,6 +1245,7 @@ def run():
12341245
arcz=".1 14 45 54 4. .2 2. -22 2-2",
12351246
)
12361247

1248+
@skip_cpython_92236
12371249
def test_bug_324(self):
12381250
# This code is tricky: the list() call pulls all the values from gen(),
12391251
# but each of them is a generator itself that is never iterated. As a
@@ -1252,6 +1264,7 @@ def gen(inp):
12521264
arcz_missing="-33 3-3",
12531265
)
12541266

1267+
@skip_cpython_92236
12551268
def test_coroutines(self):
12561269
self.check_coverage("""\
12571270
def double_inputs():
@@ -1271,6 +1284,7 @@ def double_inputs():
12711284
)
12721285
assert self.stdout() == "20\n12\n"
12731286

1287+
@skip_cpython_92236
12741288
def test_yield_from(self):
12751289
self.check_coverage("""\
12761290
def gen(inp):
@@ -1286,6 +1300,7 @@ def gen(inp):
12861300
arcz=".1 19 9. .2 23 34 45 56 63 37 7.",
12871301
)
12881302

1303+
@skip_cpython_92236
12891304
def test_abandoned_yield(self):
12901305
# https://github.com/nedbat/coveragepy/issues/440
12911306
self.check_coverage("""\
@@ -1614,6 +1629,7 @@ def test_pathologically_long_code_object(self, n):
16141629
self.check_coverage(code, arcs=[(-1, 1), (1, 2*n+4), (2*n+4, -1)])
16151630
assert self.stdout() == f"{n}\n"
16161631

1632+
@skip_cpython_92236
16171633
def test_partial_generators(self):
16181634
# https://github.com/nedbat/coveragepy/issues/475
16191635
# Line 2 is executed completely.
@@ -1830,6 +1846,7 @@ class AsyncTest(CoverageTest):
18301846
"""Tests of the new async and await keywords in Python 3.5"""
18311847

18321848
@xfail_eventlet_670
1849+
@skip_cpython_92236
18331850
def test_async(self):
18341851
self.check_coverage("""\
18351852
import asyncio
@@ -1857,6 +1874,7 @@ async def print_sum(x, y): # 8
18571874
assert self.stdout() == "Compute 1 + 2 ...\n1 + 2 = 3\n"
18581875

18591876
@xfail_eventlet_670
1877+
@skip_cpython_92236
18601878
def test_async_for(self):
18611879
self.check_coverage("""\
18621880
import asyncio
@@ -1932,6 +1950,7 @@ async def go():
19321950
# https://bugs.python.org/issue44621
19331951
@pytest.mark.skipif(env.PYVERSION[:2] == (3, 9), reason="avoid a 3.9 bug: 44621")
19341952
@pytest.mark.skipif(env.PYVERSION < (3, 7), reason="need asyncio.run")
1953+
@skip_cpython_92236
19351954
def test_bug_1158(self):
19361955
self.check_coverage("""\
19371956
import asyncio
@@ -1962,6 +1981,7 @@ async def async_test():
19621981
)
19631982
@xfail_eventlet_670
19641983
@pytest.mark.skipif(env.PYVERSION < (3, 7), reason="need asyncio.run")
1984+
@skip_cpython_92236
19651985
def test_bug_1176(self):
19661986
self.check_coverage("""\
19671987
import asyncio

0 commit comments

Comments
 (0)