File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
6
6
def test_event_loop_fixture_finalizer_returns_fresh_loop_after_test (pytester : Pytester ):
7
+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
7
8
pytester .makepyfile (
8
9
dedent (
9
10
"""\
@@ -36,6 +37,7 @@ def test_2():
36
37
def test_event_loop_fixture_finalizer_handles_loop_set_to_none_sync (
37
38
pytester : Pytester ,
38
39
):
40
+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
39
41
pytester .makepyfile (
40
42
dedent (
41
43
"""\
@@ -53,6 +55,7 @@ def test_sync(event_loop):
53
55
def test_event_loop_fixture_finalizer_handles_loop_set_to_none_async_without_fixture (
54
56
pytester : Pytester ,
55
57
):
58
+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
56
59
pytester .makepyfile (
57
60
dedent (
58
61
"""\
@@ -72,6 +75,7 @@ async def test_async_without_explicit_fixture_request():
72
75
def test_event_loop_fixture_finalizer_handles_loop_set_to_none_async_with_fixture (
73
76
pytester : Pytester ,
74
77
):
78
+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
75
79
pytester .makepyfile (
76
80
dedent (
77
81
"""\
@@ -94,6 +98,7 @@ async def test_async_with_explicit_fixture_request(event_loop):
94
98
def test_event_loop_fixture_finalizer_raises_warning_when_fixture_leaves_loop_unclosed (
95
99
pytester : Pytester ,
96
100
):
101
+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
97
102
pytester .makepyfile (
98
103
dedent (
99
104
"""\
@@ -121,6 +126,7 @@ async def test_ends_with_unclosed_loop():
121
126
def test_event_loop_fixture_finalizer_raises_warning_when_test_leaves_loop_unclosed (
122
127
pytester : Pytester ,
123
128
):
129
+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
124
130
pytester .makepyfile (
125
131
dedent (
126
132
"""\
You can’t perform that action at this time.
0 commit comments