Skip to content

Commit 5e73a4f

Browse files
committed
TST: xfail excel styler tests, xref GH25351
1 parent 4a20d5b commit 5e73a4f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pandas/tests/io/test_excel.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,7 +2413,10 @@ def style(df):
24132413
['', '', '']],
24142414
index=df.index, columns=df.columns)
24152415

2416-
def assert_equal_style(cell1, cell2):
2416+
def assert_equal_style(cell1, cell2, engine):
2417+
if engine in ['xlsxwriter', 'openpyxl']:
2418+
pytest.xfail(reason=("GH25351: failing on some attribute "
2419+
"comparisons in {}".format(engine)))
24172420
# XXX: should find a better way to check equality
24182421
assert cell1.alignment.__dict__ == cell2.alignment.__dict__
24192422
assert cell1.border.__dict__ == cell2.border.__dict__
@@ -2457,7 +2460,7 @@ def custom_converter(css):
24572460
assert len(col1) == len(col2)
24582461
for cell1, cell2 in zip(col1, col2):
24592462
assert cell1.value == cell2.value
2460-
assert_equal_style(cell1, cell2)
2463+
assert_equal_style(cell1, cell2, engine)
24612464
n_cells += 1
24622465

24632466
# ensure iteration actually happened:
@@ -2515,7 +2518,7 @@ def custom_converter(css):
25152518
assert cell1.number_format == 'General'
25162519
assert cell2.number_format == '0%'
25172520
else:
2518-
assert_equal_style(cell1, cell2)
2521+
assert_equal_style(cell1, cell2, engine)
25192522

25202523
assert cell1.value == cell2.value
25212524
n_cells += 1
@@ -2533,7 +2536,7 @@ def custom_converter(css):
25332536
assert not cell1.font.bold
25342537
assert cell2.font.bold
25352538
else:
2536-
assert_equal_style(cell1, cell2)
2539+
assert_equal_style(cell1, cell2, engine)
25372540

25382541
assert cell1.value == cell2.value
25392542
n_cells += 1

0 commit comments

Comments
 (0)