@@ -176,7 +176,7 @@ def test_contains_na_kwarg_for_nullable_string_dtype(
176176 values = Series (["a" , "b" , "c" , "a" , np .nan ], dtype = nullable_string_dtype )
177177
178178 if na in [0 , 3 ] and na is not False :
179- msg = f"na must be an NA value , True, or False; got { na } "
179+ msg = f"na must be None, pd.NA, np.nan , True, or False; got { na } "
180180 with pytest .raises (ValueError , match = msg ):
181181 values .str .contains ("a" , na = na , regex = regex )
182182 else :
@@ -252,7 +252,7 @@ def test_contains_nan(any_string_dtype):
252252 expected = Series ([True , True , True ], dtype = expected_dtype )
253253 tm .assert_series_equal (result , expected )
254254
255- msg = "na must be an NA value , True, or False; got foo"
255+ msg = "na must be None, pd.NA, np.nan , True, or False; got foo"
256256 with pytest .raises (ValueError , match = msg ):
257257 s .str .contains ("foo" , na = "foo" )
258258
@@ -339,7 +339,7 @@ def test_startswith_endswith_validate_na(any_string_dtype):
339339 ["om" , np .nan , "foo_nom" , "nom" , "bar_foo" , np .nan , "foo" ],
340340 dtype = any_string_dtype ,
341341 )
342- msg = "na must be an NA value , True, or False; got baz"
342+ msg = "na must be None, pd.NA, np.nan , True, or False; got baz"
343343 with pytest .raises (ValueError , match = msg ):
344344 ser .str .startswith ("kapow" , na = "baz" )
345345 with pytest .raises (ValueError , match = msg ):
0 commit comments