@@ -3514,18 +3514,20 @@ def test_errorbar_every_invalid():
3514
3514
ax .errorbar (x , y , yerr , errorevery = 'foobar' )
3515
3515
3516
3516
3517
- def test_xerr_yerr_positive ():
3517
+ def test_xerr_yerr_not_negative ():
3518
3518
ax = plt .figure ().subplots ()
3519
3519
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" ):
3523
3522
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" ):
3525
3525
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" ):
3527
3528
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" ):
3529
3531
x = np .arange (5 )
3530
3532
y = [datetime .datetime (2021 , 9 , i * 2 + 1 ) for i in x ]
3531
3533
ax .errorbar (x = x ,
0 commit comments