Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REG: read_excel with engine specified raises on non-path/non-buffer #39586

Merged
merged 11 commits into from
Feb 7, 2021
Prev Previous commit
Next Next commit
Added wb.close() to test
rhshadrach committed Feb 4, 2021
commit e6684e9a0f0f3d953ac05de3f7d68ddc327902d4
1 change: 1 addition & 0 deletions pandas/tests/io/excel/test_openpyxl.py
Original file line number Diff line number Diff line change
@@ -123,5 +123,6 @@ def test_read_workbook(datapath, ext):
filename = datapath("io", "data", "excel", "test1" + ext)
wb = openpyxl.load_workbook(filename)
result = pd.read_excel(wb, engine="openpyxl")
wb.close()
expected = pd.read_excel(filename)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It cannot hurt to call wb.close() before tm.assert_frame_equal

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @twoertwein, added.

tm.assert_frame_equal(result, expected)