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 33import numpy as np
44import pytest
55
6- from pandas .compat import HAS_PYARROW
6+ from pandas .compat import (
7+ HAS_PYARROW ,
8+ pa_version_under10p1 ,
9+ )
710import pandas .util ._test_decorators as td
811
912from pandas .core .dtypes .astype import astype_array
@@ -835,3 +838,10 @@ def test_pandas_dtype_string_dtypes(string_storage):
835838 with pd .option_context ("string_storage" , string_storage ):
836839 result = pandas_dtype ("string" )
837840 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