Skip to content

Commit f26abfe

Browse files
committed
tests for issue #60563
1 parent ba656b6 commit f26abfe

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pandas/tests/arrays/categorical/test_dtypes.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
import pyarrow as pa
23
import pytest
34

45
from pandas.core.dtypes.dtypes import CategoricalDtype
@@ -11,6 +12,7 @@
1112
Series,
1213
Timestamp,
1314
)
15+
from pandas.core.dtypes.dtypes import ArrowDtype
1416
import pandas._testing as tm
1517

1618

@@ -136,3 +138,17 @@ def test_interval_index_category(self):
136138
[0, 1], [1, 2], dtype="interval[uint64, right]"
137139
)
138140
tm.assert_index_equal(result, expected)
141+
142+
def test_values_is_index():
143+
# GH 60563
144+
values = Index(['a1', 'a2'], dtype=ArrowDtype(pa.string()))
145+
arr = values._data._pa_array.combine_chunks()
146+
147+
assert arr.equals(values._data._pa_array.combine_chunks())
148+
149+
def test_values_is_not_index():
150+
# GH 60563
151+
values = Series(['a1', 'a2'], dtype=ArrowDtype(pa.string()))
152+
arr = values._pa_array.combine_chunks()
153+
154+
assert arr.equals(values._pa_array.combine_chunks())

0 commit comments

Comments
 (0)