Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing: switch testdir -> pytester #250

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading