def test_dat_file(tempdir):
data = np.random.randint(size=(20000, 4),
low=-100, high=100).astype(np.int16)
fn = 'test-4ch-1s.dat'
_add_mock_response(_BASE_URL['github'] + 'test/' + fn,
data.tostring())
path = download_test_data(fn, tempdir)
with open(path, 'rb') as f:
arr = np.fromfile(f, dtype=np.int16).reshape((-1, 4))
assert arr.shape == (20000, 4)
responses.reset()
评论列表
文章目录