##// END OF EJS Templates
keep only basic changes...
keep only basic changes Kept changes: - fewer, shorter menu items (too cryptic?), with icons. - main checkbox does not open menu, but selects all/none. - total selection count next to main checkbox (unsure if this is to be kept. It does address #7628). Removed changes: - sticky menu. - checkboxes and counters in menu.

File last commit:

r18335:cc13632d
r20396:cf8a34e8
Show More
test_serialize.py
26 lines | 740 B | text/x-python | PythonLexer
"""Test serialize/deserialize messages with buffers"""
import os
import nose.tools as nt
from IPython.kernel.zmq.session import Session
from ..base.zmqhandlers import (
serialize_binary_message,
deserialize_binary_message,
)
def test_serialize_binary():
s = Session()
msg = s.msg('data_pub', content={'a': 'b'})
msg['buffers'] = [ os.urandom(3) for i in range(3) ]
bmsg = serialize_binary_message(msg)
nt.assert_is_instance(bmsg, bytes)
def test_deserialize_binary():
s = Session()
msg = s.msg('data_pub', content={'a': 'b'})
msg['buffers'] = [ os.urandom(2) for i in range(3) ]
bmsg = serialize_binary_message(msg)
msg2 = deserialize_binary_message(bmsg)
nt.assert_equal(msg2, msg)