@@ -456,13 +456,13 @@ def test_setitem_2d_values(self, data):
456
456
assert (df .loc [1 , :] == original [0 ]).all ()
457
457
458
458
def test_readonly_property (self , data ):
459
- assert data .readonly is False
459
+ assert data ._readonly is False
460
460
461
- data .readonly = True
462
- assert data .readonly is True
461
+ data ._readonly = True
462
+ assert data ._readonly is True
463
463
464
464
data_orig = data .copy ()
465
- assert data_orig .readonly is False
465
+ assert data_orig ._readonly is False
466
466
467
467
with pytest .raises (ValueError , match = "Cannot modify readonly array" ):
468
468
data [0 ] = data [1 ]
@@ -476,7 +476,7 @@ def test_readonly_property(self, data):
476
476
tm .assert_extension_array_equal (data , data_orig )
477
477
478
478
def test_readonly_propagates_to_numpy_array (self , data ):
479
- data .readonly = True
479
+ data ._readonly = True
480
480
481
481
# when we ask for a copy, the result should never be readonly
482
482
arr = np .array (data )
@@ -492,7 +492,7 @@ def test_readonly_propagates_to_numpy_array(self, data):
492
492
assert arr1 .flags .writeable
493
493
494
494
def test_readonly_propagates_to_numpy_array_method (self , data ):
495
- data .readonly = True
495
+ data ._readonly = True
496
496
497
497
# when we ask for a copy, the result should never be readonly
498
498
arr = data .to_numpy (copy = True )
0 commit comments