File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 23
23
WASM ,
24
24
is_platform_windows ,
25
25
)
26
+ from pandas .compat .pyarrow import pa_version_under19p0
26
27
import pandas .util ._test_decorators as td
27
28
28
29
import pandas as pd
29
30
import pandas ._testing as tm
30
- from pandas .util .version import Version
31
31
32
32
import pandas .io .common as icom
33
33
@@ -140,7 +140,6 @@ def test_bytesiowrapper_returns_correct_bytes(self):
140
140
141
141
# Test that pyarrow can handle a file opened with get_handle
142
142
def test_get_handle_pyarrow_compat (self ):
143
- pa = pytest .importorskip ("pyarrow" )
144
143
pa_csv = pytest .importorskip ("pyarrow.csv" )
145
144
146
145
# Test latin1, ucs-2, and ucs-4 chars
@@ -154,7 +153,7 @@ def test_get_handle_pyarrow_compat(self):
154
153
s = StringIO (data )
155
154
with icom .get_handle (s , "rb" , is_text = False ) as handles :
156
155
df = pa_csv .read_csv (handles .handle ).to_pandas ()
157
- if Version ( pa . __version__ ) < Version ( "19.0" ) :
156
+ if pa_version_under19p0 :
158
157
expected = expected .astype ("object" )
159
158
tm .assert_frame_equal (df , expected )
160
159
assert not s .closed
You can’t perform that action at this time.
0 commit comments