@@ -481,7 +481,7 @@ def test_setitem(self, float_frame):
481
481
# so raise/warn
482
482
smaller = float_frame [:2 ]
483
483
484
- msg = r"\nA value is trying to be set on a copy of a slice from a DataFrame.* "
484
+ msg = r"\nA value is trying to be set on a copy of a slice from a DataFrame"
485
485
with pytest .raises (com .SettingWithCopyError , match = msg ):
486
486
smaller ["col10" ] = ["1" , "2" ]
487
487
@@ -866,7 +866,7 @@ def test_fancy_getitem_slice_mixed(self, float_frame, float_string_frame):
866
866
# setting it triggers setting with copy
867
867
sliced = float_frame .iloc [:, - 3 :]
868
868
869
- msg = r"\nA value is trying to be set on a copy of a slice from a DataFrame.* "
869
+ msg = r"\nA value is trying to be set on a copy of a slice from a DataFrame"
870
870
with pytest .raises (com .SettingWithCopyError , match = msg ):
871
871
sliced ["C" ] = 4.0
872
872
@@ -1472,7 +1472,7 @@ def test_iloc_row(self):
1472
1472
1473
1473
# verify slice is view
1474
1474
# setting it makes it raise/warn
1475
- msg = r"\nA value is trying to be set on a copy of a slice from a DataFrame.* "
1475
+ msg = r"\nA value is trying to be set on a copy of a slice from a DataFrame"
1476
1476
with pytest .raises (com .SettingWithCopyError , match = msg ):
1477
1477
result [2 ] = 0.0
1478
1478
@@ -1504,7 +1504,7 @@ def test_iloc_col(self):
1504
1504
1505
1505
# verify slice is view
1506
1506
# and that we are setting a copy
1507
- msg = r"\nA value is trying to be set on a copy of a slice from a DataFrame.* "
1507
+ msg = r"\nA value is trying to be set on a copy of a slice from a DataFrame"
1508
1508
with pytest .raises (com .SettingWithCopyError , match = msg ):
1509
1509
result [8 ] = 0.0
1510
1510
0 commit comments