Skip to content

Commit

Permalink
testing: switch testdir -> pytester
Browse files Browse the repository at this point in the history
testdir is using the legacy py.path.
  • Loading branch information
bluetech committed Feb 24, 2024
1 parent d68c591 commit 4ef79b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions testing/test_termination.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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)
Expand Down

0 comments on commit 4ef79b5

Please sign in to comment.