@@ -512,17 +512,20 @@ def f():
512512 tm .assert_numpy_array_equal (
513513 mask , np .array ([False , True , True , True , True ]))
514514
515- def test_cut_read_only (self ):
515+ @pytest .mark .parametrize ("array_1_writeable,array_2_writeable" ,[
516+ (True , True ), (True , False ), (False , False )])
517+ def test_cut_read_only (self , array_1_writeable , array_2_writeable ):
516518 # issue 18773
517- readonly = np .arange (0 , 100 , 10 )
518- readonly .flags .writeable = False
519+ array_1 = np .arange (0 , 100 , 10 )
520+ array_1 .flags .writeable = array_1_writeable
519521
520- mutable = np .arange (0 , 100 , 10 )
522+ array_2 = np .arange (0 , 100 , 10 )
523+ array_2 .flags .writeable = array_2_writeable
521524
522525 hundred_elements = np .arange (100 )
523- tm .assert_categorical_equal (cut (hundred_elements , readonly ),
524- cut (hundred_elements , mutable ))
525526
527+ tm .assert_categorical_equal (cut (hundred_elements , array_1 ),
528+ cut (hundred_elements , array_2 ))
526529
527530def curpath ():
528531 pth , _ = os .path .split (os .path .abspath (__file__ ))
0 commit comments