Skip to content

Commit 8e98324

Browse files
author
Marco Gorelli
committed
✅ update tests so they test Series.to_markdown as well
1 parent bcb4833 commit 8e98324

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/tests/io/formats/test_to_markdown.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ def test_other_tablefmt(self):
2121
def test_other_headers(self):
2222
df = pd.DataFrame([1, 2, 3])
2323
result = df.to_markdown(headers=["foo", "bar"])
24-
assert (
25-
result
26-
== "| foo | bar |\n|------:|------:|\n| 0 | 1 |\n| 1 | 2 |\n| 2 | 3 |"
24+
assert result == (
25+
"| foo | bar |\n|------:|------:|\n| 0 "
26+
"| 1 |\n| 1 | 2 |\n| 2 | 3 |"
2727
)
2828

2929
def test_series(self):
3030
s = pd.Series([1, 2, 3], name="foo")
3131
result = s.to_markdown()
32-
assert (
33-
result
34-
== "| | foo |\n|---:|------:|\n| 0 | 1 |\n| 1 | 2 |\n| 2 | 3 |"
32+
assert result == (
33+
"| | foo |\n|---:|------:|\n| 0 | 1 "
34+
"|\n| 1 | 2 |\n| 2 | 3 |"
3535
)

0 commit comments

Comments
 (0)