Skip to content

Commit

Permalink
non portable type resolution solution
Browse files Browse the repository at this point in the history
  • Loading branch information
mxwli committed Mar 15, 2024
1 parent 3828ace commit f2fae8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/python_api/test/test_df_pyarrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ def test_pyarrow_time(conn_db_readonly : ConnDB) -> None:
assert expected.to_pytimedelta() == actual.to_pytimedelta()
for colname in ['col4', 'col5', 'col6', 'col7', 'col8']:
for expected, actual in zip(df[colname], result[colname]):
assert expected.to_pydatetime() == actual.to_pydatetime()
tmp1 = expected if type(expected) is datetime else expected.to_pydatetime()
tmp2 = actual if type(actual) is datetime else actual.to_pydatetime()
assert tmp1 == tmp2
for colname in ['col9', 'col10']:
for expected, actual in zip(df[colname], result[colname]):
assert datetime.combine(expected, datetime.min.time()) == actual.to_pydatetime()
Expand Down

0 comments on commit f2fae8f

Please sign in to comment.