Skip to content

Commit eba2ea8

Browse files
Fix test in test_readers.py which failed due to a double warning
1 parent b3e2af5 commit eba2ea8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pandas/tests/io/excel/test_readers.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,10 @@ def test_read_excel_squeeze(self, read_ext):
962962
expected = pd.Series([1, 2, 3], name="a")
963963
tm.assert_series_equal(actual, expected)
964964

965-
def test_deprecated_kwargs(self, read_ext):
965+
def test_deprecated_kwargs(self, engine, read_ext):
966+
if read_ext in [".xls", ".xlsx", ".xlsm"]:
967+
pytest.skip("xlrd produces a DeprecatedWarning on use")
968+
966969
with tm.assert_produces_warning(FutureWarning, raise_on_extra_warnings=False):
967970
pd.read_excel("test1" + read_ext, "Sheet1", 0)
968971

pandas/tests/io/excel/test_xlrd.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def test_read_xlrd_book(read_ext, frame):
2828
with tm.ensure_clean(read_ext) as pth:
2929
df.to_excel(pth, sheet_name)
3030
book = xlrd.open_workbook(pth)
31+
3132
with ExcelFile(book, engine=engine) as xl:
3233
result = pd.read_excel(xl, sheet_name=sheet_name, index_col=0)
3334
tm.assert_frame_equal(df, result)

0 commit comments

Comments
 (0)