Skip to content

Commit fc40c6d

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

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/test_arcs.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
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+
)
20+
1621
class SimpleArcTest(CoverageTest):
1722
"""Tests for coverage.py's arc measurement."""
1823

@@ -605,6 +610,7 @@ def wrong_loop(x):
605610
arcz_missing="26 3. 6.",
606611
)
607612

613+
@skip_cpython_92236
608614
def test_generator_expression(self):
609615
# Generator expression:
610616
self.check_coverage("""\
@@ -617,6 +623,7 @@ def test_generator_expression(self):
617623
arcz=".1 -22 2-2 12 23 34 45 53 3.",
618624
)
619625

626+
@skip_cpython_92236
620627
def test_generator_expression_another_way(self):
621628
# https://bugs.python.org/issue44450
622629
# Generator expression:
@@ -1169,6 +1176,7 @@ def func(x):
11691176
class YieldTest(CoverageTest):
11701177
"""Arc tests for generators."""
11711178

1179+
@skip_cpython_92236
11721180
def test_yield_in_loop(self):
11731181
self.check_coverage("""\
11741182
def gen(inp):
@@ -1180,6 +1188,7 @@ def gen(inp):
11801188
arcz=".1 .2 23 2. 32 15 5.",
11811189
)
11821190

1191+
@skip_cpython_92236
11831192
def test_padded_yield_in_loop(self):
11841193
self.check_coverage("""\
11851194
def gen(inp):
@@ -1200,6 +1209,7 @@ def gen(inp):
12001209
env.PYVERSION[:5] == (3, 11, 0, 'alpha', 3),
12011210
reason="avoid 3.11 bug: bpo46225",
12021211
)
1212+
@skip_cpython_92236
12031213
def test_bug_308(self):
12041214
self.check_coverage("""\
12051215
def run():
@@ -1234,6 +1244,7 @@ def run():
12341244
arcz=".1 14 45 54 4. .2 2. -22 2-2",
12351245
)
12361246

1247+
@skip_cpython_92236
12371248
def test_bug_324(self):
12381249
# This code is tricky: the list() call pulls all the values from gen(),
12391250
# but each of them is a generator itself that is never iterated. As a
@@ -1252,6 +1263,7 @@ def gen(inp):
12521263
arcz_missing="-33 3-3",
12531264
)
12541265

1266+
@skip_cpython_92236
12551267
def test_coroutines(self):
12561268
self.check_coverage("""\
12571269
def double_inputs():
@@ -1271,6 +1283,7 @@ def double_inputs():
12711283
)
12721284
assert self.stdout() == "20\n12\n"
12731285

1286+
@skip_cpython_92236
12741287
def test_yield_from(self):
12751288
self.check_coverage("""\
12761289
def gen(inp):
@@ -1286,6 +1299,7 @@ def gen(inp):
12861299
arcz=".1 19 9. .2 23 34 45 56 63 37 7.",
12871300
)
12881301

1302+
@skip_cpython_92236
12891303
def test_abandoned_yield(self):
12901304
# https://github.com/nedbat/coveragepy/issues/440
12911305
self.check_coverage("""\
@@ -1614,6 +1628,7 @@ def test_pathologically_long_code_object(self, n):
16141628
self.check_coverage(code, arcs=[(-1, 1), (1, 2*n+4), (2*n+4, -1)])
16151629
assert self.stdout() == f"{n}\n"
16161630

1631+
@skip_cpython_92236
16171632
def test_partial_generators(self):
16181633
# https://github.com/nedbat/coveragepy/issues/475
16191634
# Line 2 is executed completely.
@@ -1830,6 +1845,7 @@ class AsyncTest(CoverageTest):
18301845
"""Tests of the new async and await keywords in Python 3.5"""
18311846

18321847
@xfail_eventlet_670
1848+
@skip_cpython_92236
18331849
def test_async(self):
18341850
self.check_coverage("""\
18351851
import asyncio
@@ -1857,6 +1873,7 @@ async def print_sum(x, y): # 8
18571873
assert self.stdout() == "Compute 1 + 2 ...\n1 + 2 = 3\n"
18581874

18591875
@xfail_eventlet_670
1876+
@skip_cpython_92236
18601877
def test_async_for(self):
18611878
self.check_coverage("""\
18621879
import asyncio
@@ -1932,6 +1949,7 @@ async def go():
19321949
# https://bugs.python.org/issue44621
19331950
@pytest.mark.skipif(env.PYVERSION[:2] == (3, 9), reason="avoid a 3.9 bug: 44621")
19341951
@pytest.mark.skipif(env.PYVERSION < (3, 7), reason="need asyncio.run")
1952+
@skip_cpython_92236
19351953
def test_bug_1158(self):
19361954
self.check_coverage("""\
19371955
import asyncio
@@ -1962,6 +1980,7 @@ async def async_test():
19621980
)
19631981
@xfail_eventlet_670
19641982
@pytest.mark.skipif(env.PYVERSION < (3, 7), reason="need asyncio.run")
1983+
@skip_cpython_92236
19651984
def test_bug_1176(self):
19661985
self.check_coverage("""\
19671986
import asyncio

0 commit comments

Comments
 (0)