Skip to content

Commit

Permalink
Convert test_sql to pytest idiom (pandas-dev#54936)
Browse files Browse the repository at this point in the history
* Convert test_sql to pytest idiom

* Try KeyError catch

* Added drop_view to existing test method

* xfail MySQL issue
  • Loading branch information
WillAyd authored Sep 7, 2023
1 parent a7cb226 commit cea0cc0
Show file tree
Hide file tree
Showing 2 changed files with 630 additions and 380 deletions.
2 changes: 1 addition & 1 deletion pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _parse_date_columns(data_frame, parse_dates):
if isinstance(df_col.dtype, DatetimeTZDtype) or col_name in parse_dates:
try:
fmt = parse_dates[col_name]
except TypeError:
except (KeyError, TypeError):
fmt = None
data_frame.isetitem(i, _handle_date_column(df_col, format=fmt))

Expand Down
Loading

0 comments on commit cea0cc0

Please sign in to comment.