Skip to content

Commit 9ae80f5

Browse files
committed
Add test
1 parent ee0902a commit 9ae80f5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

pandas/tests/dtypes/test_common.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
import numpy as np
44
import pytest
55

6-
from pandas.compat import HAS_PYARROW
6+
from pandas.compat import (
7+
HAS_PYARROW,
8+
pa_version_under10p1,
9+
)
710
import pandas.util._test_decorators as td
811

912
from 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]")

0 commit comments

Comments
 (0)