File tree 4 files changed +4
-4
lines changed
4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ event loop. This will take effect even if you're using the
81
81
82
82
.. code-block :: python
83
83
84
- @pytest.yield_fixture ()
84
+ @pytest.fixture
85
85
def event_loop ():
86
86
loop = MyCustomLoop()
87
87
yield loop
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ def pytest_runtest_setup(item):
166
166
)
167
167
168
168
169
- @pytest .yield_fixture
169
+ @pytest .fixture
170
170
def event_loop (request ):
171
171
"""Create an instance of the default event loop for each test case."""
172
172
loop = asyncio .get_event_loop_policy ().new_event_loop ()
Original file line number Diff line number Diff line change 9
9
collect_ignore .append ("async_fixtures/test_nested_36.py" )
10
10
11
11
12
- @pytest .yield_fixture ()
12
+ @pytest .fixture
13
13
def dependent_fixture (event_loop ):
14
14
"""A fixture dependent on the event_loop fixture, doing some cleanup."""
15
15
counter = 0
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class CustomSelectorLoop(asyncio.SelectorEventLoop):
8
8
pass
9
9
10
10
11
- @pytest .yield_fixture ()
11
+ @pytest .fixture
12
12
def event_loop ():
13
13
"""Create an instance of the default event loop for each test case."""
14
14
loop = CustomSelectorLoop ()
You can’t perform that action at this time.
0 commit comments