Skip to content

Commit

Permalink
add unit test for repeated column names
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikeyann committed Jul 5, 2021
1 parent 4cb82a7 commit 81494a9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions python/cudf/cudf/tests/test_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,17 @@ def test_csv_reader_column_names(names):
assert list(df) == list(names)


def test_csv_reader_repeated_column_name():
buffer = """A,A,A.1,A,A.2,A,A.4,A,A
1,2,3.1,4,a.2,a,a.4,a,a
2,4,6.1,8,b.2,b,b.4,b,b"""

# pandas and cudf to have same repeated column names
pdf = pd.read_csv(StringIO(buffer))
gdf = cudf.read_csv(StringIO(buffer))
assert_eq(pdf.columns, gdf.columns)


def test_csv_reader_bools_false_positives(tmpdir):
# values that are equal to ["True", "TRUE", "False", "FALSE"]
# when using ints to detect bool values
Expand Down

0 comments on commit 81494a9

Please sign in to comment.