Skip to content

Commit cc78408

Browse files
authored
Skip test when no xlwt or openpyxl (#37841)
1 parent 3ca6330 commit cc78408

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/io/test_fsspec.py

+5
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ def test_csv_options(fsspectest):
126126

127127
@pytest.mark.parametrize("extension", ["xlsx", "xls"])
128128
def test_excel_options(fsspectest, extension):
129+
if extension == "xls":
130+
pytest.importorskip("xlwt")
131+
else:
132+
pytest.importorskip("openpyxl")
133+
129134
df = DataFrame({"a": [0]})
130135

131136
path = f"testmem://test/test.{extension}"

0 commit comments

Comments
 (0)