Skip to content

Commit c6f37d1

Browse files
fixup attribute name in tests
1 parent 9cd6e4f commit c6f37d1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/tests/extension/base/setitem.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,13 @@ def test_setitem_2d_values(self, data):
456456
assert (df.loc[1, :] == original[0]).all()
457457

458458
def test_readonly_property(self, data):
459-
assert data.readonly is False
459+
assert data._readonly is False
460460

461-
data.readonly = True
462-
assert data.readonly is True
461+
data._readonly = True
462+
assert data._readonly is True
463463

464464
data_orig = data.copy()
465-
assert data_orig.readonly is False
465+
assert data_orig._readonly is False
466466

467467
with pytest.raises(ValueError, match="Cannot modify readonly array"):
468468
data[0] = data[1]
@@ -476,7 +476,7 @@ def test_readonly_property(self, data):
476476
tm.assert_extension_array_equal(data, data_orig)
477477

478478
def test_readonly_propagates_to_numpy_array(self, data):
479-
data.readonly = True
479+
data._readonly = True
480480

481481
# when we ask for a copy, the result should never be readonly
482482
arr = np.array(data)
@@ -492,7 +492,7 @@ def test_readonly_propagates_to_numpy_array(self, data):
492492
assert arr1.flags.writeable
493493

494494
def test_readonly_propagates_to_numpy_array_method(self, data):
495-
data.readonly = True
495+
data._readonly = True
496496

497497
# when we ask for a copy, the result should never be readonly
498498
arr = data.to_numpy(copy=True)

0 commit comments

Comments
 (0)