Skip to content

Commit 7edb497

Browse files
committed
Fix tests to respect system line endings
1 parent 5e8098e commit 7edb497

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tests/io/formats/test_to_csv.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ def test_to_csv_na_rep(self):
207207
# GH 29975
208208
# Make sure full na_rep shows up when a dtype is provided
209209
csv = pd.Series(["a", pd.NA, "c"]).to_csv(na_rep="ZZZZZ")
210-
assert ",0\n0,a\n1,ZZZZZ\n2,c\n" == csv
211-
210+
expected = tm.convert_rows_list_to_csv_str([",0", "0,a", "1,ZZZZZ", "2,c"])
211+
assert expected == csv
212212
csv = pd.Series(["a", pd.NA, "c"], dtype="string").to_csv(na_rep="ZZZZZ")
213-
assert ",0\n0,a\n1,ZZZZZ\n2,c\n" == csv
213+
assert expected == csv
214214

215215
def test_to_csv_date_format(self):
216216
# GH 10209

0 commit comments

Comments
 (0)