Skip to content

Commit 94af2ec

Browse files
committed
Remove use of StringIO in test, just get returned value instead
1 parent 1386759 commit 94af2ec

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pandas/tests/io/formats/test_to_csv.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import numpy as np
77
import pytest
88

9-
from pandas.compat import StringIO
10-
119
import pandas as pd
1210
from pandas import DataFrame, compat
1311
from pandas.util import testing as tm
@@ -552,8 +550,6 @@ def test_to_csv_na_rep_long_string(self, df_value, df_new_type):
552550
'mynull']
553551
expected = tm.convert_rows_list_to_csv_str(expected_rows)
554552

555-
csv_data = StringIO()
556-
df.to_csv(csv_data, index=False, na_rep='mynull', encoding='ascii')
557-
result = csv_data.getvalue()
553+
result = df.to_csv(index=False, na_rep='mynull', encoding='ascii')
558554

559555
assert expected == result

0 commit comments

Comments
 (0)