Skip to content

Commit 81a3607

Browse files
committed
add test for incorrect values
1 parent 57e3f0a commit 81a3607

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
Binary file not shown.

pandas/tests/io/excel/test_readers.py

+5
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,11 @@ def test_reader_seconds(self, request, engine, read_ext):
10141014
actual = pd.read_excel("times_1904" + read_ext, sheet_name="Sheet1")
10151015
tm.assert_frame_equal(actual, expected)
10161016

1017+
if read_ext == ".ods":
1018+
msg = "Failed to parse ODF time value: PT01H5a2M00S"
1019+
with pytest.raises(ValueError, match=msg):
1020+
pd.read_excel("test_corrupted_time" + read_ext)
1021+
10171022
def test_read_excel_multiindex(self, request, engine, read_ext):
10181023
# see gh-4679
10191024
if engine == "pyxlsb":

0 commit comments

Comments
 (0)