File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
pytest
2
2
pytest-cov
3
- trio ; python_version >= '3.5'
4
- pytest-trio ; python_version >= '3.5'
3
+ pytest-asyncio ; python_version >= '3.5'
4
+ async-generator ; python_version >= '3.5'
Original file line number Diff line number Diff line change
1
+ import asyncio
1
2
import sys
2
3
3
4
import pytest
4
- import trio
5
5
from async_generator import async_generator , yield_
6
6
7
7
import outcome
8
8
from outcome import AlreadyUsedError , Error , Value
9
9
10
- pytestmark = pytest .mark .trio
10
+ pytestmark = pytest .mark .asyncio
11
11
12
12
13
13
async def test_acapture ():
14
14
async def add (x , y ):
15
- await trio . hazmat . checkpoint ( )
15
+ await asyncio . sleep ( 0 )
16
16
return x + y
17
17
18
18
v = await outcome .acapture (add , 3 , y = 4 )
19
19
assert v == Value (7 )
20
20
21
21
async def raise_ValueError (x ):
22
- await trio . hazmat . checkpoint ( )
22
+ await asyncio . sleep ( 0 )
23
23
raise ValueError (x )
24
24
25
25
e = await outcome .acapture (raise_ValueError , 9 )
You can’t perform that action at this time.
0 commit comments