Skip to content

Commit 3d8c0b4

Browse files
authored
Merge pull request #61 from njsmith/trio-asyncio-by-python-version
Don't try to install trio-asyncio on Pythons where it doesn't work
2 parents 2c5f476 + 874fe40 commit 3d8c0b4

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

pytest_trio/_tests/test_trio_asyncio.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
import asyncio
44
from async_generator import async_generator, yield_
55

6-
if sys.version_info < (3, 6):
7-
pytestmark = pytest.mark.skip(
8-
reason="trio-asyncio doesn't seem to work on 3.5"
9-
)
10-
else:
6+
try:
117
import trio_asyncio
8+
except ImportError:
9+
pytestmark = pytest.mark.skip(reason="trio-asyncio not available")
1210

1311

1412
async def use_run_asyncio():

test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pytest !=3.7.0, !=3.7.1 # https://github.com/python-trio/pytest-trio/pull/50#issuecomment-413124393
22
pytest-cov
33
hypothesis>=3.64
4-
trio-asyncio
4+
trio-asyncio; python_version >= "3.5.3"

0 commit comments

Comments
 (0)