66
77
88def test_asyncio_mark_on_sync_function_emits_warning (pytester : Pytester ):
9+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
910 pytester .makepyfile (
1011 dedent (
1112 """\
@@ -27,6 +28,7 @@ def test_a():
2728def test_asyncio_mark_on_async_generator_function_emits_warning_in_strict_mode (
2829 pytester : Pytester ,
2930):
31+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
3032 pytester .makepyfile (
3133 dedent (
3234 """\
@@ -48,6 +50,7 @@ async def test_a():
4850def test_asyncio_mark_on_async_generator_function_emits_warning_in_auto_mode (
4951 pytester : Pytester ,
5052):
53+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
5154 pytester .makepyfile (
5255 dedent (
5356 """\
@@ -66,6 +69,7 @@ async def test_a():
6669def test_asyncio_mark_on_async_generator_method_emits_warning_in_strict_mode (
6770 pytester : Pytester ,
6871):
72+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
6973 pytester .makepyfile (
7074 dedent (
7175 """\
@@ -88,6 +92,7 @@ async def test_a(self):
8892def test_asyncio_mark_on_async_generator_method_emits_warning_in_auto_mode (
8993 pytester : Pytester ,
9094):
95+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
9196 pytester .makepyfile (
9297 dedent (
9398 """\
@@ -108,6 +113,7 @@ async def test_a():
108113def test_asyncio_mark_on_async_generator_staticmethod_emits_warning_in_strict_mode (
109114 pytester : Pytester ,
110115):
116+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
111117 pytester .makepyfile (
112118 dedent (
113119 """\
@@ -131,6 +137,7 @@ async def test_a():
131137def test_asyncio_mark_on_async_generator_staticmethod_emits_warning_in_auto_mode (
132138 pytester : Pytester ,
133139):
140+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
134141 pytester .makepyfile (
135142 dedent (
136143 """\
0 commit comments