File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 35
35
import pytest
36
36
37
37
from pandas ._libs import lib
38
- from pandas .compat import pa_version_under8p0
38
+ from pandas .compat import (
39
+ pa_version_under8p0 ,
40
+ pa_version_under13p0 ,
41
+ )
39
42
from pandas .compat ._optional import import_optional_dependency
40
43
import pandas .util ._test_decorators as td
41
44
@@ -1746,13 +1749,16 @@ def test_api_custom_dateparsing_error(
1746
1749
if conn_name == "postgresql_adbc_conn" :
1747
1750
expected = expected .astype (
1748
1751
{
1749
- "DateCol" : "datetime64[us]" , # TODO: is this astype allowed?
1750
1752
"IntDateCol" : "int32" ,
1751
1753
"IntDateOnlyCol" : "int32" ,
1752
1754
"IntCol" : "int32" ,
1753
1755
}
1754
1756
)
1755
1757
1758
+ if not pa_version_under13p0 :
1759
+ # TODO: is this astype safe?
1760
+ expected ["DateCol" ] = expected ["DateCol" ].astype ("datetime64[us]" )
1761
+
1756
1762
tm .assert_frame_equal (result , expected )
1757
1763
1758
1764
You can’t perform that action at this time.
0 commit comments