Skip to content

Commit e6e6b03

Browse files
takluyverminrk
authored andcommitted
Backport PR #349: fix testing patch for pyzmq < 17
zmq.COPY_THRESHOLD is undefined prior to pyzmq 17, so we need `create=True` to define it in that case. Signed-off-by: Min RK <[email protected]>
1 parent 37d1104 commit e6e6b03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyter_client/tests/test_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def setUp(self):
4141
@pytest.fixture
4242
def no_copy_threshold():
4343
"""Disable zero-copy optimizations in pyzmq >= 17"""
44-
with mock.patch.object(zmq, 'COPY_THRESHOLD', 1):
44+
with mock.patch.object(zmq, 'COPY_THRESHOLD', 1, create=True):
4545
yield
4646

4747

0 commit comments

Comments
 (0)