Closed
Description
The tests in https://github.com/pandas-dev/pandas/blob/master/pandas/tests/extension/base/setitem.py seem to mainly operate on ExtensionArrays that are boxed in a Series.
It would be good to directly test ExtensionArray.setitem.
Some of these tests could be parametrized with something like
@pytest.fixture(params=[True, False])
def box(request):
"""Whether to box the data in a Series"""
return request.param
def test_setitem_scalar_series(self, data, box):
if box:
data = pd.Series(data)
data[0] = data[1
assert arr[0] == data[1]
others may have to be written separately.