Skip to content

Commit cea0cc0

Browse files
authored
Convert test_sql to pytest idiom (#54936)
* Convert test_sql to pytest idiom * Try KeyError catch * Added drop_view to existing test method * xfail MySQL issue
1 parent a7cb226 commit cea0cc0

File tree

2 files changed

+630
-380
lines changed

2 files changed

+630
-380
lines changed

pandas/io/sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def _parse_date_columns(data_frame, parse_dates):
138138
if isinstance(df_col.dtype, DatetimeTZDtype) or col_name in parse_dates:
139139
try:
140140
fmt = parse_dates[col_name]
141-
except TypeError:
141+
except (KeyError, TypeError):
142142
fmt = None
143143
data_frame.isetitem(i, _handle_date_column(df_col, format=fmt))
144144

0 commit comments

Comments
 (0)