Skip to content

Commit 288675b

Browse files
committed
Simpify pandas test.
1 parent ce385ce commit 288675b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_thirdparty.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ def test_pandas():
141141

142142
# Pandas 1.5 changed the API for to_csv()
143143
if tuple(int(v) for v in __version__.split(".")) < (1, 5):
144-
assert (
145-
",Letter,Number\n" "0,alpha,1\n" "1,bravo,2\n" "2,charlie,3\n"
146-
) == df.to_csv(line_terminator="\n")
144+
kwargs = dict(line_terminator="\n")
147145
else:
148-
assert (
149-
",Letter,Number\n" "0,alpha,1\n" "1,bravo,2\n" "2,charlie,3\n"
150-
) == df.to_csv(lineterminator="\n")
146+
kwargs = dict(lineterminator="\n")
147+
148+
assert (
149+
",Letter,Number\n" "0,alpha,1\n" "1,bravo,2\n" "2,charlie,3\n"
150+
) == df.to_csv(**kwargs)

0 commit comments

Comments
 (0)