Skip to content

Commit

Permalink
fixup test (#30660)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger authored and jbrockmendel committed Jan 3, 2020
1 parent 0ce0bb5 commit c1b8573
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pandas/tests/extension/base/setitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,9 @@ def test_setitem_scalar_key_sequence_raise(self, data):

def test_setitem_preserves_views(self, data):
# GH#28150 setitem shouldn't swap the underlying data
assert data[-1] != data[0] # otherwise test would not be meaningful

view1 = data.view()
view2 = data[:]

data[0] = data[-1]
assert view1[0] == data[-1]
assert view2[0] == data[-1]
data[0] = data[1]
assert view1[0] == data[1]
assert view2[0] == data[1]

0 comments on commit c1b8573

Please sign in to comment.