diff --git a/pandas/tests/io/data/excel/test_boolean_types.xlsx b/pandas/tests/io/data/excel/test_boolean_types.xlsx deleted file mode 100644 index 234703c32f0ab..0000000000000 Binary files a/pandas/tests/io/data/excel/test_boolean_types.xlsx and /dev/null differ diff --git a/pandas/tests/io/excel/test_readers.py b/pandas/tests/io/excel/test_readers.py index 0c62b7df8e2cc..bc041882b9fab 100644 --- a/pandas/tests/io/excel/test_readers.py +++ b/pandas/tests/io/excel/test_readers.py @@ -165,13 +165,13 @@ def xfail_datetimes_with_pyxlsb(engine, request): class TestReaders: @pytest.mark.parametrize("col", [[True, None, False], [True], [True, False]]) - def test_read_excel_type_check(self, col, datapath): + def test_read_excel_type_check(self, col, tmp_excel, read_ext): # GH 58159 + if read_ext in (".xlsb", ".xls"): + pytest.skip(f"No engine for filetype: '{read_ext}'") df = DataFrame({"bool_column": col}, dtype="boolean") - f_path = datapath("io", "data", "excel", "test_boolean_types.xlsx") - - df.to_excel(f_path, index=False) - df2 = pd.read_excel(f_path, dtype={"bool_column": "boolean"}, engine="openpyxl") + df.to_excel(tmp_excel, index=False) + df2 = pd.read_excel(tmp_excel, dtype={"bool_column": "boolean"}) tm.assert_frame_equal(df, df2) def test_pass_none_type(self, datapath):