Skip to content

Commit 9fa18dd

Browse files
committed
refactor: Addressed warnings about missing default fixture loop scope in tests/test_import.py.
1 parent 68a2da0 commit 9fa18dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_import.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55

66
def test_import_warning_does_not_cause_internal_error(pytester: Pytester):
7+
pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
78
pytester.makepyfile(
89
dedent(
910
"""\
@@ -19,6 +20,7 @@ async def test_errors_out():
1920

2021

2122
def test_import_warning_in_package_does_not_cause_internal_error(pytester: Pytester):
23+
pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
2224
pytester.makepyfile(
2325
__init__=dedent(
2426
"""\
@@ -37,6 +39,7 @@ async def test_errors_out():
3739

3840

3941
def test_does_not_import_unrelated_packages(pytester: Pytester):
42+
pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
4043
pkg_dir = pytester.mkpydir("mypkg")
4144
pkg_dir.joinpath("__init__.py").write_text(
4245
dedent(

0 commit comments

Comments
 (0)