File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 44
55
66def test_strict_mode_cmdline (pytester : Pytester ):
7+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
78 pytester .makepyfile (
89 dedent (
910 """\
@@ -23,6 +24,15 @@ async def test_a():
2324
2425
2526def test_strict_mode_cfg (pytester : Pytester ):
27+ pytester .makeini (
28+ dedent (
29+ """\
30+ [pytest]
31+ asyncio_default_fixture_loop_scope = function
32+ asyncio_mode = strict
33+ """
34+ )
35+ )
2636 pytester .makepyfile (
2737 dedent (
2838 """\
@@ -37,12 +47,12 @@ async def test_a():
3747 """
3848 )
3949 )
40- pytester .makefile (".ini" , pytest = "[pytest]\n asyncio_mode = strict\n " )
4150 result = pytester .runpytest ()
4251 result .assert_outcomes (passed = 1 )
4352
4453
4554def test_strict_mode_method_fixture (pytester : Pytester ):
55+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
4656 pytester .makepyfile (
4757 dedent (
4858 """\
@@ -71,6 +81,7 @@ async def test_a(self, fixture_a):
7181
7282
7383def test_strict_mode_ignores_unmarked_coroutine (pytester : Pytester ):
84+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
7485 pytester .makepyfile (
7586 dedent (
7687 """\
@@ -87,6 +98,7 @@ async def test_anything():
8798
8899
89100def test_strict_mode_ignores_unmarked_fixture (pytester : Pytester ):
101+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
90102 pytester .makepyfile (
91103 dedent (
92104 """\
You can’t perform that action at this time.
0 commit comments