File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -425,19 +425,6 @@ async def test_anyio_mark_last_fail(x):
425
425
def test_lock_backend (
426
426
backend_name : str , testdir : Pytester , monkeypatch : MonkeyPatch
427
427
) -> None :
428
- testdir .makeconftest (
429
- f"""
430
- import os
431
- import sys
432
-
433
- pytest_plugins = ["anyio"]
434
-
435
- os.environ["ANYIO_BACKEND"] = "{ backend_name } "
436
- del sys.modules['anyio._core._eventloop']
437
- del sys.modules['anyio.pytest_plugin']
438
- del sys.modules['anyio']
439
- """
440
- )
441
428
testdir .makepyfile (
442
429
f"""
443
430
import os
@@ -455,5 +442,6 @@ async def test_sleep(anyio_backend_name):
455
442
"""
456
443
)
457
444
458
- result = testdir .runpytest ("-p" , "no:anyio" )
445
+ monkeypatch .setenv ("ANYIO_BACKEND" , backend_name )
446
+ result = testdir .runpytest_subprocess (* pytest_args )
459
447
result .assert_outcomes (passed = 1 )
You can’t perform that action at this time.
0 commit comments