Skip to content

Commit f0c8797

Browse files
committed
test(fix): skip tests that trip a specific Mac 3.9 eventlet bug
1 parent 3dfa449 commit f0c8797

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

coverage/env.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# Operating systems.
1111
WINDOWS = sys.platform == "win32"
1212
LINUX = sys.platform.startswith("linux")
13+
OSX = sys.platform == "darwin"
1314

1415
# Python implementations.
1516
CPYTHON = (platform.python_implementation() == "CPython")

tests/test_arcs.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,9 +1830,17 @@ def test_lambda_in_dict(self):
18301830
)
18311831

18321832

1833+
skip_eventlet_670 = pytest.mark.skipif(
1834+
env.PYVERSION[:2] == (3, 9) and env.OSX,
1835+
reason="Avoid an eventlet bug on Mac 3.9: eventlet#670",
1836+
# https://github.com/eventlet/eventlet/issues/670
1837+
)
1838+
1839+
18331840
class AsyncTest(CoverageTest):
18341841
"""Tests of the new async and await keywords in Python 3.5"""
18351842

1843+
@skip_eventlet_670
18361844
def test_async(self):
18371845
self.check_coverage("""\
18381846
import asyncio
@@ -1860,6 +1868,7 @@ async def print_sum(x, y): # 8
18601868
)
18611869
assert self.stdout() == "Compute 1 + 2 ...\n1 + 2 = 3\n"
18621870

1871+
@skip_eventlet_670
18631872
def test_async_for(self):
18641873
self.check_coverage("""\
18651874
import asyncio
@@ -1962,6 +1971,7 @@ async def async_test():
19621971
(3, 10, 0, "alpha", 0, 0) <= env.PYVERSION[:6] <= (3, 10, 0, "beta", 4, 0),
19631972
reason="avoid a 3.10 bug fixed after beta 4: 44622"
19641973
)
1974+
@skip_eventlet_670
19651975
@pytest.mark.skipif(env.PYVERSION < (3, 7), reason="need asyncio.run")
19661976
def test_bug1176(self):
19671977
self.check_coverage("""\

0 commit comments

Comments
 (0)