Skip to content

Commit

Permalink
Merge pull request #176 from pytest-dev/ronny/addtest-123
Browse files Browse the repository at this point in the history
add test for #123
  • Loading branch information
RonnyPfannschmidt authored Jan 24, 2023
2 parents 874b523 + 584e881 commit a8cdc41
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions testing/test_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,3 +500,31 @@ def test_popen_args(spec, expected_args):
expected_args = expected_args + ["-u", "-c", gateway_io.popen_bootstrapline]
args = gateway_io.popen_args(execnet.XSpec(spec))
assert args == expected_args


@pytest.mark.parametrize(
"interleave_getstatus",
[
pytest.param(True, id="interleave-remote-status"),
pytest.param(
False,
id="no-interleave-remote-status",
marks=pytest.mark.xfail(
reason="https://github.com/pytest-dev/execnet/issues/123",
),
),
],
)
def test_regression_gevent_hangs(group, interleave_getstatus):
pytest.importorskip("gevent")
gw = group.makegateway("popen//execmodel=gevent")

print(gw.remote_status())

def sendback(channel):
channel.send(1234)

ch = gw.remote_exec(sendback)
if interleave_getstatus:
print(gw.remote_status())
assert ch.receive(timeout=0.5) == 1234

0 comments on commit a8cdc41

Please sign in to comment.