Skip to content

Commit a1eee67

Browse files
committed
test for warning
1 parent 5d59898 commit a1eee67

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/tests/io/test_excel.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -935,10 +935,14 @@ def test_read_excel_parse_dates(self):
935935
with ensure_clean(self.ext) as pth:
936936
df2.to_excel(pth)
937937

938-
# no index_col specified
939938
res = read_excel(pth)
940939
tm.assert_frame_equal(df2, res)
941940

941+
# no index_col specified when parse_dates is True
942+
with tm.assert_produces_warning():
943+
res = read_excel(pth, parse_dates=True)
944+
tm.assert_frame_equal(df2, res)
945+
942946
res = read_excel(pth, parse_dates=['date_strings'], index_col=0)
943947
tm.assert_frame_equal(df, res)
944948

0 commit comments

Comments
 (0)