Skip to content

Commit 5d8aa70

Browse files
WillAydmroeschke
authored andcommitted
Convert test_sql to pytest idiom (pandas-dev#54936)
* Convert test_sql to pytest idiom * Try KeyError catch * Added drop_view to existing test method * xfail MySQL issue
1 parent 6654daf commit 5d8aa70

File tree

2 files changed

+630
-380
lines changed

2 files changed

+630
-380
lines changed

pandas/io/sql.py

+1-1
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)