1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Description: Mark tests that need openpyxl
(These do the usual loop through engine/read_ext but
actually use .xlsx every time)
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no
--- a/pandas/tests/io/excel/test_readers.py
+++ b/pandas/tests/io/excel/test_readers.py
@@ -1671,12 +1671,14 @@ class TestExcelFileRead:
expected = pd.read_excel("test1" + read_ext, engine=engine)
tm.assert_frame_equal(result, expected)
+ @td.skip_if_no("openpyxl")
def test_read_excel_header_index_out_of_range(self, engine):
# GH#43143
with open("df_header_oob.xlsx", "rb") as f:
with pytest.raises(ValueError, match="exceeds maximum"):
pd.read_excel(f, header=[0, 1])
+ @td.skip_if_no("openpyxl")
@pytest.mark.parametrize("filename", ["df_empty.xlsx", "df_equals.xlsx"])
def test_header_with_index_col(self, filename):
# GH 33476
|