Skip to content

Commit

Permalink
fix on pyarrow-less builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel committed Aug 1, 2023
1 parent 360eb9d commit c5156eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pandas/tests/extension/base/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def test_value_counts_with_normalize(self, data):
expected = pd.Series(0.0, index=result.index, name="proportion")
expected[result > 0] = 1 / len(values)

if data.dtype == "string[pyarrow]" or isinstance(data.dtype, pd.ArrowDtype):
if getattr(data.dtype, "storage", "") == "pyarrow" or isinstance(
data.dtype, pd.ArrowDtype
):
# TODO: avoid special-casing
expected = expected.astype("double[pyarrow]")
elif na_value_for_dtype(data.dtype) is pd.NA:
Expand Down

0 comments on commit c5156eb

Please sign in to comment.