Skip to content

Commit

Permalink
TST: Remove unnecessary test_boolean_types.xlsx (#59348)
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke authored Jul 29, 2024
1 parent c8bdce9 commit f4c454a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Binary file removed pandas/tests/io/data/excel/test_boolean_types.xlsx
Binary file not shown.
10 changes: 5 additions & 5 deletions pandas/tests/io/excel/test_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f4c454a

Please sign in to comment.