Skip to content

Commit

Permalink
revert unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
elstehle committed Jun 17, 2021
1 parent 8479017 commit e408fad
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions python/cudf/cudf/tests/test_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1599,10 +1599,8 @@ def test_csv_writer_column_and_header_options(

def test_csv_writer_empty_columns_parameter(cudf_mixed_dataframe):
df = cudf_mixed_dataframe

buffer = BytesIO()
with pytest.raises(RuntimeError):
df.to_csv(buffer, columns=[], index=False)
write_str = df.to_csv(columns=[], index=False)
assert_eq(write_str, "\n")


def test_csv_writer_multiindex(tmpdir):
Expand Down Expand Up @@ -1995,3 +1993,13 @@ def test_to_csv_compression_error():
error_message = "Writing compressed csv is not currently supported in cudf"
with pytest.raises(NotImplementedError, match=re.escape(error_message)):
df.to_csv("test.csv", compression=compression)


def test_empty_df_no_index():
actual = cudf.DataFrame({})
buffer = BytesIO()
actual.to_csv(buffer, index=False)

result = cudf.read_csv(buffer)

assert_eq(actual, result)

0 comments on commit e408fad

Please sign in to comment.