File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 44
55
66def test_event_loop_fixture_finalizer_returns_fresh_loop_after_test (pytester : Pytester ):
7+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
78 pytester .makepyfile (
89 dedent (
910 """\
@@ -36,6 +37,7 @@ def test_2():
3637def test_event_loop_fixture_finalizer_handles_loop_set_to_none_sync (
3738 pytester : Pytester ,
3839):
40+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
3941 pytester .makepyfile (
4042 dedent (
4143 """\
@@ -53,6 +55,7 @@ def test_sync(event_loop):
5355def test_event_loop_fixture_finalizer_handles_loop_set_to_none_async_without_fixture (
5456 pytester : Pytester ,
5557):
58+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
5659 pytester .makepyfile (
5760 dedent (
5861 """\
@@ -72,6 +75,7 @@ async def test_async_without_explicit_fixture_request():
7275def test_event_loop_fixture_finalizer_handles_loop_set_to_none_async_with_fixture (
7376 pytester : Pytester ,
7477):
78+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
7579 pytester .makepyfile (
7680 dedent (
7781 """\
@@ -94,6 +98,7 @@ async def test_async_with_explicit_fixture_request(event_loop):
9498def test_event_loop_fixture_finalizer_raises_warning_when_fixture_leaves_loop_unclosed (
9599 pytester : Pytester ,
96100):
101+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
97102 pytester .makepyfile (
98103 dedent (
99104 """\
@@ -121,6 +126,7 @@ async def test_ends_with_unclosed_loop():
121126def test_event_loop_fixture_finalizer_raises_warning_when_test_leaves_loop_unclosed (
122127 pytester : Pytester ,
123128):
129+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
124130 pytester .makepyfile (
125131 dedent (
126132 """\
You can’t perform that action at this time.
0 commit comments