@@ -242,7 +242,7 @@ def test_tripcolor_color():
242242 x = [- 1 , 0 , 1 , 0 ]
243243 y = [0 , - 1 , 0 , 1 ]
244244 fig , ax = plt .subplots ()
245- with pytest .raises (ValueError , match = "Missing color parameter " ):
245+ with pytest .raises (TypeError , match = r"tripcolor\(\) missing 1 required " ):
246246 ax .tripcolor (x , y )
247247 with pytest .raises (ValueError , match = "The length of C must match either" ):
248248 ax .tripcolor (x , y , [1 , 2 , 3 ])
@@ -255,8 +255,8 @@ def test_tripcolor_color():
255255 with pytest .raises (ValueError ,
256256 match = "'gouraud' .* at the points.* not at the faces" ):
257257 ax .tripcolor (x , y , [1 , 2 ], shading = 'gouraud' ) # faces
258- with pytest .raises (ValueError ,
259- match = r"pass C positionally or facecolors via keyword" ):
258+ with pytest .raises (TypeError ,
259+ match = "positional.*'C'.* keyword-only.*'facecolors' " ):
260260 ax .tripcolor (x , y , C = [1 , 2 , 3 , 4 ])
261261
262262 # smoke test for valid color specifications (via C or facecolors)
@@ -282,7 +282,7 @@ def test_tripcolor_warnings():
282282 C = [0.4 , 0.5 ]
283283 fig , ax = plt .subplots ()
284284 # additional parameters
285- with pytest .warns (UserWarning , match = "Additional positional parameters " ):
285+ with pytest .warns (DeprecationWarning , match = "Additional positional param " ):
286286 ax .tripcolor (x , y , C , 'unused_positional' )
287287 # facecolors takes precednced over C
288288 with pytest .warns (UserWarning , match = "Positional parameter C .*no effect" ):
0 commit comments