Skip to content

Commit a027769

Browse files
authored
Merge pull request #293 from bsipocz/MAINT_update_for_pytest_asyncio_1
MAINT: xfailing test now passes with new version
2 parents e629f50 + cfec47d commit a027769

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/test_doctestplus.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313

1414
try:
1515
import pytest_asyncio # noqa: F401
16-
has_pytest_asyncio = True
16+
if Version(pytest_asyncio.__version__) < Version('1.0'):
17+
main_pytest_asyncio_xfails = True
18+
else:
19+
main_pytest_asyncio_xfails = False
1720
except ImportError:
18-
has_pytest_asyncio = False
19-
21+
main_pytest_asyncio_xfails = False
2022

2123

2224
pytest_plugins = ['pytester']
@@ -1189,7 +1191,7 @@ class MyClass:
11891191

11901192

11911193
@pytest.mark.xfail(
1192-
has_pytest_asyncio,
1194+
main_pytest_asyncio_xfails,
11931195
reason='pytest_asyncio monkey-patches .collect()')
11941196
def test_main(testdir):
11951197
pkg = testdir.mkdir('pkg')

0 commit comments

Comments
 (0)