Skip to content

Commit

Permalink
TST: add test for Series.item backed with ExtensionArray (pandas-dev#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored and proost committed Dec 19, 2019
1 parent b681e7f commit 5b74f2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pandas/tests/extension/base/getitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,9 @@ def test_loc_len1(self, data):
df = pd.DataFrame({"A": data})
res = df.loc[[0], "A"]
assert res._data._block.ndim == 1

def test_item(self, data):
# https://github.com/pandas-dev/pandas/pull/30175
s = pd.Series(data)
result = s[:1].item()
assert result == data[0]

0 comments on commit 5b74f2c

Please sign in to comment.