@@ -3514,18 +3514,20 @@ def test_errorbar_every_invalid():
35143514 ax .errorbar (x , y , yerr , errorevery = 'foobar' )
35153515
35163516
3517- def test_xerr_yerr_positive ():
3517+ def test_xerr_yerr_not_negative ():
35183518 ax = plt .figure ().subplots ()
35193519
3520- error_message = "'xerr' and 'yerr' must have non-negative values"
3521-
3522- with pytest .raises (ValueError , match = error_message ):
3520+ with pytest .raises (ValueError ,
3521+ match = "'xerr' must not contain negative values" ):
35233522 ax .errorbar (x = [0 ], y = [0 ], xerr = [[- 0.5 ], [1 ]], yerr = [[- 0.5 ], [1 ]])
3524- with pytest .raises (ValueError , match = error_message ):
3523+ with pytest .raises (ValueError ,
3524+ match = "'xerr' must not contain negative values" ):
35253525 ax .errorbar (x = [0 ], y = [0 ], xerr = [[- 0.5 ], [1 ]])
3526- with pytest .raises (ValueError , match = error_message ):
3526+ with pytest .raises (ValueError ,
3527+ match = "'yerr' must not contain negative values" ):
35273528 ax .errorbar (x = [0 ], y = [0 ], yerr = [[- 0.5 ], [1 ]])
3528- with pytest .raises (ValueError , match = error_message ):
3529+ with pytest .raises (ValueError ,
3530+ match = "'yerr' must not contain negative values" ):
35293531 x = np .arange (5 )
35303532 y = [datetime .datetime (2021 , 9 , i * 2 + 1 ) for i in x ]
35313533 ax .errorbar (x = x ,
0 commit comments