Skip to content

Commit c39e178

Browse files
jorisvandenbosscheTomAugspurger
authored andcommitted
TST: add test for Series.item backed with ExtensionArray (#30318)
1 parent 16dd0d3 commit c39e178

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/extension/base/getitem.py

+6
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,9 @@ def test_loc_len1(self, data):
266266
df = pd.DataFrame({"A": data})
267267
res = df.loc[[0], "A"]
268268
assert res._data._block.ndim == 1
269+
270+
def test_item(self, data):
271+
# https://github.com/pandas-dev/pandas/pull/30175
272+
s = pd.Series(data)
273+
result = s[:1].item()
274+
assert result == data[0]

0 commit comments

Comments
 (0)