def test_byte_transport(server): conn = Client(**socket_options) s = 8 r = conn(test=dict(test_byte_transport=(s, ))) assert r['test']['test_byte_transport'] == s
def test_str_transport(server): conn = Client(**socket_options) s = 'hello' r = conn(test=dict(test_str_transport=(s, ))) assert r['test']['test_str_transport'] == s
def test_ndarray_transport2(server): conn = Client(**socket_options) arr = np.array([1, 2, 3, 4], dtype=np.int64) r = conn(test=dict(test_ndarray_transport2=(arr, ))) np.testing.assert_equal(r['test']['test_ndarray_transport2'], arr)
def test_Data_transport2(server): conn = Client(**socket_options) data = dict(a=1, b=[1, 2, 3], c=dict(d=13.4)) r = conn(test=dict(test_Data_transport2=(data, ))) assert r['test']['test_Data_transport2'] == data
def test_buffer_transport(server): conn = Client(**socket_options) arr = np.array([1, 2, 3, 4], dtype=np.int64) r = conn(test=dict(test_buffer_transport=(arr, ))) np.testing.assert_equal(r['test']['test_buffer_transport'], arr.view(np.uint8))