diff --git a/pandas/tests/indexing/test_indexing.py b/pandas/tests/indexing/test_indexing.py index 0ff33ba88b16f..07275302dcf9f 100644 --- a/pandas/tests/indexing/test_indexing.py +++ b/pandas/tests/indexing/test_indexing.py @@ -728,9 +728,7 @@ def run_tests(df, rhs, right_loc, right_iloc): right_iloc["joe"] = [1.0, "@-28", "@-20", "@-12", 17.0] right_iloc["jolie"] = ["@2", -26.0, -18.0, -10.0, "@18"] if using_infer_string: - with pytest.raises( - TypeError, match="Must provide strings|Scalar must be NA or str" - ): + with pytest.raises(TypeError, match="Invalid value"): with tm.assert_produces_warning( FutureWarning, match="incompatible dtype" ):