File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,11 @@ def test_eq_all_na():
26
26
tm .assert_extension_array_equal (result , expected )
27
27
28
28
29
- def test_config (string_storage , request , using_infer_string ):
29
+ def test_config (string_storage , using_infer_string ):
30
+ # with the default string_storage setting
31
+ # always "python" at the moment
32
+ assert StringDtype ().storage == "python"
33
+
30
34
with pd .option_context ("string_storage" , string_storage ):
31
35
assert StringDtype ().storage == string_storage
32
36
result = pd .array (["a" , "b" ])
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
7
import pandas .util ._test_decorators as td
7
8
8
9
from pandas .core .dtypes .astype import astype_array
@@ -802,13 +803,17 @@ def test_pandas_dtype_ea_not_instance():
802
803
803
804
804
805
def test_pandas_dtype_string_dtypes (string_storage ):
805
- # TODO(infer_string) remove skip if "python" is supported
806
- pytest .importorskip ("pyarrow" )
806
+ with pd .option_context ("future.infer_string" , True ):
807
+ # with the default string_storage setting
808
+ result = pandas_dtype ("str" )
809
+ assert result == pd .StringDtype (
810
+ "pyarrow" if HAS_PYARROW else "python" , na_value = np .nan
811
+ )
812
+
807
813
with pd .option_context ("future.infer_string" , True ):
808
814
with pd .option_context ("string_storage" , string_storage ):
809
815
result = pandas_dtype ("str" )
810
- # TODO(infer_string) hardcoded to pyarrow until python is supported
811
- assert result == pd .StringDtype ("pyarrow" , na_value = np .nan )
816
+ assert result == pd .StringDtype (string_storage , na_value = np .nan )
812
817
813
818
with pd .option_context ("future.infer_string" , False ):
814
819
with pd .option_context ("string_storage" , string_storage ):
You can’t perform that action at this time.
0 commit comments