Skip to content

Commit 86e92c4

Browse files
committed
Updated skip Asyncio support for python version 3.11 and above
1 parent 46568cc commit 86e92c4

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

testing/test_unittest.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,15 +1321,12 @@ def test_async_support(pytester: Pytester) -> None:
13211321
reprec = pytester.inline_run()
13221322
reprec.assertoutcome(failed=1, passed=2)
13231323

1324-
1324+
import sys
1325+
import pytest
1326+
@pytest.mark.skipif(sys.version_info >= (3, 11), reason="asynctest is not compatible with Python 3.11+")
13251327
def test_asynctest_support(pytester: Pytester) -> None:
13261328
"""Check asynctest support (#7110)"""
1327-
import sys
1328-
if sys.version_info >= (3, 11):
1329-
import pytest
1330-
pytest.skip("asynctest is not compatible with Python 3.11+")
13311329
pytest.importorskip("asynctest")
1332-
13331330
pytester.copy_example("unittest/test_unittest_asynctest.py")
13341331
reprec = pytester.inline_run()
13351332
reprec.assertoutcome(failed=1, passed=2)
@@ -1676,4 +1673,4 @@ def abstract2(self): pass
16761673
)
16771674
result = pytester.runpytest()
16781675
assert result.ret == ExitCode.OK
1679-
result.assert_outcomes(passed=1)
1676+
result.assert_outcomes(passed=1)

0 commit comments

Comments
 (0)