コード例 #1
0
ファイル: test_with_n.py プロジェクト: yohplala/fastparquet
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
コード例 #2
0
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
コード例 #3
0
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