File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 17
17
from pandas .compat .pyarrow import (
18
18
pa_version_under2p0 ,
19
19
pa_version_under5p0 ,
20
+ pa_version_under6p0 ,
20
21
)
21
22
import pandas .util ._test_decorators as td
22
23
@@ -902,10 +903,15 @@ def test_additional_extension_types(self, pa):
902
903
check_round_trip (df , pa )
903
904
904
905
def test_timestamp_nanoseconds (self , pa ):
905
- # with version 2.0 , pyarrow defaults to writing the nanoseconds, so
906
+ # with version 2.6 , pyarrow defaults to writing the nanoseconds, so
906
907
# this should work without error
908
+ # Note in previous pyarrows(<6.0.0), only the pseudo-version 2.0 was available
909
+ if not pa_version_under6p0 :
910
+ ver = "2.6"
911
+ else :
912
+ ver = "2.0"
907
913
df = pd .DataFrame ({"a" : pd .date_range ("2017-01-01" , freq = "1n" , periods = 10 )})
908
- check_round_trip (df , pa , write_kwargs = {"version" : "2.0" })
914
+ check_round_trip (df , pa , write_kwargs = {"version" : ver })
909
915
910
916
def test_timezone_aware_index (self , pa , timezone_aware_date_list ):
911
917
if not pa_version_under2p0 :
You can’t perform that action at this time.
0 commit comments