File tree Expand file tree Collapse file tree 2 files changed +5
-20
lines changed Expand file tree Collapse file tree 2 files changed +5
-20
lines changed Original file line number Diff line number Diff line change 1
- # XX this should switch to using pytest-trio as soon as pytest-trio is
2
- # released...
3
-
4
1
import inspect
5
2
import pytest
6
- from trio .testing import MockClock , trio_test
3
+ from trio .testing import trio_test
7
4
8
5
@pytest .fixture
9
- def mock_clock ():
10
- return MockClock ()
11
-
12
-
13
- @pytest .fixture
14
- def autojump_clock ():
15
- return MockClock (autojump_threshold = 0 )
16
-
6
+ async def foo ():
7
+ yield "bar"
17
8
18
9
@pytest .hookimpl (tryfirst = True )
19
10
def pytest_pyfunc_call (pyfuncitem ):
Original file line number Diff line number Diff line change 1
- import trio
2
-
3
- # We can just use 'async def test_*' to define async tests.
4
- # This also uses a virtual clock fixture, so time passes quickly and
5
- # predictably.
6
- async def test_basic_import ():
7
- from trio_gpio import gpio
8
- assert gpio .Card
1
+ async def test_basic (foo ):
2
+ assert foo == "bar"
You can’t perform that action at this time.
0 commit comments