Skip to content

Commit 9533d15

Browse files
committed
stop skipping test_input_request
it works fine locally
1 parent e9e4493 commit 9533d15

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/test_client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
# Copyright (c) Jupyter Development Team.
44
# Distributed under the terms of the Modified BSD License.
55
import os
6-
import platform
7-
import sys
86
from threading import Event
9-
from unittest import TestCase, mock
7+
from unittest import TestCase
108

119
import pytest
1210
from IPython.utils.capture import capture_output
@@ -124,13 +122,15 @@ def _check_reply(self, reply_type, reply):
124122
assert reply["header"]["msg_type"] == reply_type + "_reply"
125123
assert reply["parent_header"]["msg_type"] == reply_type + "_request"
126124

127-
@pytest.mark.skipif(
128-
sys.platform != "linux" or platform.python_implementation().lower() == "pypy",
129-
reason="only works with cpython on ubuntu in ci",
130-
)
131125
async def test_input_request(self, kc):
132-
with mock.patch("builtins.input", return_value="test\n"):
133-
reply = await kc.execute_interactive("a = input()", timeout=TIMEOUT)
126+
def handle_stdin(msg):
127+
kc.input("test")
128+
129+
reply = await kc.execute_interactive(
130+
"a = input()",
131+
stdin_hook=handle_stdin,
132+
timeout=TIMEOUT,
133+
)
134134
assert reply["content"]["status"] == "ok"
135135

136136
async def test_output_hook(self, kc):

0 commit comments

Comments
 (0)