File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 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
8181
8282.. code-block :: python
8383
84- @pytest.yield_fixture ()
84+ @pytest.fixture
8585 def event_loop ():
8686 loop = MyCustomLoop()
8787 yield loop
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ def pytest_runtest_setup(item):
166166 )
167167
168168
169- @pytest .yield_fixture
169+ @pytest .fixture
170170def event_loop (request ):
171171 """Create an instance of the default event loop for each test case."""
172172 loop = asyncio .get_event_loop_policy ().new_event_loop ()
Original file line number Diff line number Diff line change 99 collect_ignore .append ("async_fixtures/test_nested_36.py" )
1010
1111
12- @pytest .yield_fixture ()
12+ @pytest .fixture
1313def dependent_fixture (event_loop ):
1414 """A fixture dependent on the event_loop fixture, doing some cleanup."""
1515 counter = 0
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class CustomSelectorLoop(asyncio.SelectorEventLoop):
88 pass
99
1010
11- @pytest .yield_fixture ()
11+ @pytest .fixture
1212def event_loop ():
1313 """Create an instance of the default event loop for each test case."""
1414 loop = CustomSelectorLoop ()
You can’t perform that action at this time.
0 commit comments