Skip to content

Commit 7f936b7

Browse files
committed
test private attribute used in 'live_info'
1 parent 243561d commit 7f936b7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -*- coding: utf-8 -*-
2+
import ipykernel.iostream
3+
import zmq
4+
5+
6+
def test_private_api_used_in_live_info():
7+
"""We are catching all errors in
8+
adaptive.notebook_integration.should_update
9+
so if ipykernel changed its API it would happen unnoticed."""
10+
# XXX: find a potential better solution in
11+
# https://github.com/ipython/ipykernel/issues/365
12+
ctx = zmq.Context()
13+
iopub_socket = ctx.socket(zmq.PUB)
14+
iopub_thread = ipykernel.iostream.IOPubThread(iopub_socket)
15+
assert hasattr(iopub_thread, '_events')

0 commit comments

Comments
 (0)