Skip to content

Commit

Permalink
CHORE: Enable mistakenly ignored tests (#60827)
Browse files Browse the repository at this point in the history
Enable ignored tests
  • Loading branch information
quangngd authored Feb 2, 2025
1 parent d72f165 commit f1441b2
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions pandas/tests/io/formats/test_to_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,17 @@ def test_to_string_with_formatters_unicode(self):
)
assert result == expected

def test_to_string_index_formatter(self):
df = DataFrame([range(5), range(5, 10), range(10, 15)])

rs = df.to_string(formatters={"__index__": lambda x: "abc"[x]})

xp = dedent(
"""\
0 1 2 3 4
a 0 1 2 3 4
b 5 6 7 8 9
c 10 11 12 13 14\
"""
)
assert rs == xp
def test_to_string_index_formatter(self):
df = DataFrame([range(5), range(5, 10), range(10, 15)])
rs = df.to_string(formatters={"__index__": lambda x: "abc"[x]})
xp = dedent(
"""\
0 1 2 3 4
a 0 1 2 3 4
b 5 6 7 8 9
c 10 11 12 13 14"""
)
assert rs == xp

def test_no_extra_space(self):
# GH#52690: Check that no extra space is given
Expand Down

0 comments on commit f1441b2

Please sign in to comment.