Skip to content

Commit

Permalink
fixup existing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Dec 4, 2023
1 parent 8683fb6 commit 7416752
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pandas/tests/series/indexing/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,16 @@ def test_basic_getitem_dt64tz_values():
assert result == expected


def test_getitem_setitem_ellipsis():
def test_getitem_setitem_ellipsis(using_copy_on_write, warn_copy_on_write):
s = Series(np.random.default_rng(2).standard_normal(10))

result = s[...]
tm.assert_series_equal(result, s)

s[...] = 5
assert (result == 5).all()
with tm.assert_cow_warning(warn_copy_on_write):
s[...] = 5
if not using_copy_on_write:
assert (result == 5).all()


@pytest.mark.parametrize(
Expand Down

0 comments on commit 7416752

Please sign in to comment.