Skip to content

Commit

Permalink
fix python test
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Oct 26, 2022
1 parent 8ae5707 commit d99bfe5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions python/cudf/cudf/tests/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,14 +827,20 @@ def test_read_text_byte_range(datadir):


def test_read_text_byte_range_large(tmpdir):
content = str([["\n" if x % 5 == 0 else "x"] for x in range(0, 3000)])
delimiter = "1."
content = "".join(("\n" if x % 5 == 4 else "x") for x in range(0, 3000))
delimiter = "\n"
temp_file = str(tmpdir) + "/temp.txt"

with open(temp_file, "w") as f:
f.write(content)

cudf.read_text(temp_file, delimiter=delimiter)
expected = cudf.Series(["xxxx\n" for i in range(0, 200)])

actual = cudf.read_text(
temp_file, delimiter=delimiter, byte_range=[1000, 1000]
)

assert_eq(expected, actual)


def test_read_text_in_memory(datadir):
Expand Down

0 comments on commit d99bfe5

Please sign in to comment.