Skip to content

Commit 48fe7a2

Browse files
committed
Remove use of StringIO in test, just get returned value instead
1 parent 1c7460a commit 48fe7a2

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
@@ -551,8 +549,6 @@ def test_to_csv_na_rep_long_string(self, df_value, df_new_type):
551549
'mynull']
552550
expected = tm.convert_rows_list_to_csv_str(expected_rows)
553551

554-
csv_data = StringIO()
555-
df.to_csv(csv_data, index=False, na_rep='mynull', encoding='ascii')
556-
result = csv_data.getvalue()
552+
result = df.to_csv(index=False, na_rep='mynull', encoding='ascii')
557553

558554
assert expected == result

0 commit comments

Comments
 (0)