Skip to content

Commit 66437f5

Browse files
kinowBruno P. Kinoshita
authored and
Bruno P. Kinoshita
committed
Remove use of StringIO in test, just get returned value instead
1 parent 61e7d47 commit 66437f5

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
@@ -4,8 +4,6 @@
44
import numpy as np
55
import pytest
66

7-
from pandas.compat import StringIO
8-
97
import pandas as pd
108
from pandas import DataFrame, compat
119
from pandas.util import testing as tm
@@ -530,8 +528,6 @@ def test_to_csv_na_rep_long_string(self, df_value, df_new_type):
530528
'mynull']
531529
expected = tm.convert_rows_list_to_csv_str(expected_rows)
532530

533-
csv_data = StringIO()
534-
df.to_csv(csv_data, index=False, na_rep='mynull', encoding='ascii')
535-
result = csv_data.getvalue()
531+
result = df.to_csv(index=False, na_rep='mynull', encoding='ascii')
536532

537533
assert expected == result

0 commit comments

Comments
 (0)