File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
12
12
def test_hypothesis_given_decorator_before_asyncio_mark (pytester : Pytester ):
13
+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
13
14
pytester .makepyfile (
14
15
dedent (
15
16
"""\
@@ -42,6 +43,7 @@ async def test_mark_and_parametrize(x, y):
42
43
43
44
44
45
def test_can_use_explicit_event_loop_fixture (pytester : Pytester ):
46
+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = module" )
45
47
pytester .makepyfile (
46
48
dedent (
47
49
"""\
@@ -78,6 +80,7 @@ async def test_explicit_fixture_request(event_loop, n):
78
80
79
81
80
82
def test_async_auto_marked (pytester : Pytester ):
83
+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
81
84
pytester .makepyfile (
82
85
dedent (
83
86
"""\
@@ -100,6 +103,7 @@ async def test_hypothesis(n: int):
100
103
101
104
def test_sync_not_auto_marked (pytester : Pytester ):
102
105
"""Assert that synchronous Hypothesis functions are not marked with asyncio"""
106
+ pytester .makeini ("[pytest]\n asyncio_default_fixture_loop_scope = function" )
103
107
pytester .makepyfile (
104
108
dedent (
105
109
"""\
You can’t perform that action at this time.
0 commit comments