Skip to content

Commit 4f05b1b

Browse files
kinowBruno P. Kinoshita
authored and
Bruno P. Kinoshita
committed
Remove use of StringIO in test, just get returned value instead
1 parent 8fc504b commit 4f05b1b

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
@@ -570,8 +568,6 @@ def test_to_csv_na_rep_long_string(self, df_value, df_new_type):
570568
'mynull']
571569
expected = tm.convert_rows_list_to_csv_str(expected_rows)
572570

573-
csv_data = StringIO()
574-
df.to_csv(csv_data, index=False, na_rep='mynull', encoding='ascii')
575-
result = csv_data.getvalue()
571+
result = df.to_csv(index=False, na_rep='mynull', encoding='ascii')
576572

577573
assert expected == result

0 commit comments

Comments
 (0)