From 4ef79b5bc50f2c1de7ee07d8c78947c1b53d8d66 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 24 Feb 2024 18:54:16 +0200 Subject: [PATCH] testing: switch testdir -> pytester testdir is using the legacy py.path. --- testing/test_termination.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/test_termination.py b/testing/test_termination.py index 5da516c4..6abd444e 100644 --- a/testing/test_termination.py +++ b/testing/test_termination.py @@ -70,8 +70,8 @@ def test_termination_on_remote_channel_receive(monkeypatch, makegateway): assert str(pid) not in output.stdout, output -def test_close_initiating_remote_no_error(testdir, anypython): - p = testdir.makepyfile( +def test_close_initiating_remote_no_error(pytester, anypython): + p = pytester.makepyfile( """ import sys sys.path.insert(0, sys.argv[1]) @@ -96,14 +96,14 @@ def test_close_initiating_remote_no_error(testdir, anypython): assert not lines -def test_terminate_implicit_does_trykill(testdir, anypython, capfd, pool): +def test_terminate_implicit_does_trykill(pytester, anypython, capfd, pool): if pool.execmodel.backend not in ("thread", "main_thread_only"): pytest.xfail("only os threading model supported") if sys.version_info >= (3, 12): pytest.xfail( "since python3.12 this test triggers RuntimeError: can't create new thread at interpreter shutdown" ) - p = testdir.makepyfile( + p = pytester.makepyfile( """ import sys sys.path.insert(0, %r)