# Path: tests/data.py



import numpy as np
import blimpy as bl
from tests.data import voyager_raw, voyager_block1
    from blimpy.rawhdr import cmd_tool


def test_guppi():

    gr = bl.guppi.GuppiRaw(voyager_raw)
    header, _ = gr.read_header()
    nchans = header['OBSNCHAN']
    assert (nchans == 64), 'test_guppi: OBSNCHAN should be 64 but observed to be {}'.format(nchans)

    _, data_block_x1, data_block_y1 = gr.read_next_data_block_int8()
    _, data_block_x2, data_block_y2 = gr.read_next_data_block_int8()

    assert not np.array_equal(data_block_x1, data_block_x2) \
        and not np.array_equal(data_block_y1, data_block_y2) \
        , "test_guppi: Data read from two blocks should not be equal"

    gr = bl.guppi.GuppiRaw(voyager_raw)
    _, data_block_1 = gr.read_next_data_block()

    data_block_reference_1 = np.load(voyager_block1)


# Path: tests/data.py



# Path: tests/test_guppi.py
import numpy as np
import blimpy as bl
from tests.data import voyager_raw, voyager_block1
    from blimpy.rawhdr import cmd_tool



def test_guppi():

    gr = bl.guppi.GuppiRaw(voyager_raw)
    header, _ = gr.read_header()
    nchans = header['OBSNCHAN']
    assert (nchans == 64), 'test_guppi: OBSNCHAN should be 64 but observed to be {}'.format(nchans)

    _, data_block_x1, data_block_y1 = gr.read_next_data_block_int8()
    _, data_block_x2, data_block_y2 = gr.read_next_data_block_int8()

    assert not np.array_equal(data_block_x1, data_block_x2) \
        and not np.array_equal(data_block_y1, data_block_y2) \
        , "test_guppi: Data read from two blocks should not be equal"

    gr = bl.guppi.GuppiRaw(voyager_raw)
    _, data_block_1 = gr.read_next_data_block()

    data_block_reference_1 = np.load(voyager_block1)


    assert np.array_equal(data_block_1[:, :1000, :], data_block_reference_1) \