Skip to content

Commit 10356af

Browse files
committed
Fix test_run_task
Using `with trio_asyncio.open_loop` (instead of async with) fails with `AttributeError: __enter__` on Python 3.7+.
1 parent 313cfaf commit 10356af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ async def nest(x):
167167
with pytest.raises(RuntimeError):
168168
trio_asyncio.run_trio_task(nest, 100)
169169

170-
with pytest.raises(RuntimeError):
170+
with pytest.raises((AttributeError, RuntimeError)):
171171
with trio_asyncio.open_loop():
172172
nest(1000)
173173

0 commit comments

Comments
 (0)