File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 3
3
import numpy as np
4
4
import pytest
5
5
6
- from pandas .compat import HAS_PYARROW
6
+ from pandas .compat import (
7
+ HAS_PYARROW ,
8
+ pa_version_under10p1 ,
9
+ )
7
10
import pandas .util ._test_decorators as td
8
11
9
12
from pandas .core .dtypes .astype import astype_array
@@ -835,3 +838,10 @@ def test_pandas_dtype_string_dtypes(string_storage):
835
838
with pd .option_context ("string_storage" , string_storage ):
836
839
result = pandas_dtype ("string" )
837
840
assert result == pd .StringDtype (string_storage , na_value = pd .NA )
841
+
842
+
843
+ @pytest .mark .skipif (not pa_version_under10p1 , reason = "pyarrow>=10.0.1 installed" )
844
+ def test_construct_from_string_without_pyarrow_installed ():
845
+ # GH 57928
846
+ with pytest .raises (ImportError , match = "pyarrow>=10.0.1 is required" ):
847
+ pd .Series ([- 1.5 , 0.2 , None ], dtype = "float32[pyarrow]" )
You can’t perform that action at this time.
0 commit comments