Skip to content

Commit

Permalink
Add a test for byte_range
Browse files Browse the repository at this point in the history
  • Loading branch information
sft-managed authored and sft-managed committed Mar 22, 2022
1 parent 2d74d42 commit 4859623
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/dask_cudf/dask_cudf/io/tests/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ def test_read_text(file, chunksize):
df1 = cudf.read_text(text_file, delimiter='"]')
df2 = dask_cudf.read_text(file, chunksize=chunksize, delimiter='"]')
dd.assert_eq(df1, df2, check_index=False)


@pytest.mark.parametrize("offset", [0, 100, 250, 500, 1000])
@pytest.mark.parametrize("size", [64, 128, 256])
def test_read_text_byte_range(offset, size):
df1 = cudf.read_text(text_file, delimiter=".", byte_range=(offset, size))
df2 = dask_cudf.read_text(
text_file, chunksize=None, delimiter=".", byte_range=(offset, size)
)
dd.assert_eq(df1, df2, check_index=False)

0 comments on commit 4859623

Please sign in to comment.