@@ -327,7 +327,7 @@ def test_map_missing_key(na_action):
327327 mapping = {1 : "a" , 2 : "b" , 3 : "c" }
328328
329329 if na_action == "raise" :
330- with pytest .raises (ValueError ):
330+ with pytest .raises (ValueError , match = "not covered" ):
331331 s .map (mapping , na_action = na_action )
332332 else :
333333 expected = Series (["a" , "b" , np .nan ])
@@ -418,7 +418,7 @@ class DictWithoutMissing(dict):
418418 dictionary = DictWithoutMissing ({3 : "three" })
419419
420420 if na_action == "raise" :
421- with pytest .raises (ValueError ):
421+ with pytest .raises (ValueError , match = "not covered" ):
422422 _ = s .map (dictionary , na_action = na_action )
423423 else :
424424 result = s .map (dictionary , na_action = na_action )
@@ -433,7 +433,7 @@ def test_map_abc_mapping(non_dict_mapping_subclass, na_action):
433433 not_a_dictionary = non_dict_mapping_subclass ({3 : "three" })
434434
435435 if na_action == "raise" :
436- with pytest .raises (ValueError ):
436+ with pytest .raises (ValueError , match = "not covered" ):
437437 _ = s .map (not_a_dictionary , na_action = na_action )
438438 else :
439439 result = s .map (not_a_dictionary , na_action = na_action )
0 commit comments