Skip to content

Commit 922bb55

Browse files
author
Quentin Peter
committed
skip stdin_stream if dummy socket
1 parent 404c437 commit 922bb55

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ipykernel/kernelbase.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
from jupyter_client.session import Session
4242

4343
from ._version import kernel_protocol_version
44+
from .inprocess.socket import DummySocket
4445

4546
CONTROL_PRIORITY = 1
4647
SHELL_PRIORITY = 10
@@ -173,6 +174,11 @@ def __init__(self, **kwargs):
173174

174175
self._stdin_msg = None
175176
self._stdin_lock = threading.Lock()
177+
178+
if isinstance(self.stdin_socket, DummySocket):
179+
# This is a test
180+
self.stdin_stream = None
181+
return
176182
self.stdin_stream = ZMQStream(self.stdin_socket)
177183

178184
def handle_msg(msg):

0 commit comments

Comments
 (0)