def test_read_data(): with open(os.path.join(TEST_DATA, 'read_data')) as f: for i, l in enumerate(f): (data, fo_encoding, value_count, bit_width, res) = eval(l) i = encoding.NumpyIO(data) out = core.read_data(i, fo_encoding, value_count, bit_width) for o, r in zip(out, res): # result from old version is sometimes 1 value too long assert o == r
def test_read_data(): with open(os.path.join(here, 'read_data')) as f: for i, l in enumerate(f): (data, fo_encoding, value_count, bit_width, res) = eval(l) i = encoding.Numpy8(np.frombuffer(util.byte_buffer(data), dtype=np.uint8)) out = core.read_data(i, fo_encoding, value_count, bit_width) for o, r in zip(out, res): # result from old version is sometimes 1 value too long assert o == r
def test_read_data(): with open(os.path.join(here, 'read_data')) as f: for i, l in enumerate(f): (data, fo_encoding, value_count, bit_width, res) = eval(l) i = encoding.Numpy8( np.frombuffer(util.byte_buffer(data), dtype=np.uint8)) out = core.read_data(i, fo_encoding, value_count, bit_width) for o, r in zip(out, res): # result from old version is sometimes 1 value too long assert o == r