@@ -494,44 +494,31 @@ def test_autoscale():
494
494
495
495
496
496
def test_invalid_axes_limits ():
497
- error_string = 'NaN or Inf cannot be the argument values'
498
497
fig = plt .figure ()
499
498
ax = fig .add_subplot (111 , projection = '3d' )
500
- with pytest .raises (ValueError ) as err :
499
+ with pytest .raises (ValueError ):
501
500
ax .set_xlim3d (left = np .nan )
502
- assert err .value .message == error_string
503
- with pytest .raises (ValueError ) as err :
501
+ with pytest .raises (ValueError ):
504
502
ax .set_xlim3d (left = np .inf )
505
- assert err .value .message == error_string
506
- with pytest .raises (ValueError ) as err :
503
+ with pytest .raises (ValueError ):
507
504
ax .set_xlim3d (right = np .nan )
508
- assert err .value .message == error_string
509
- with pytest .raises (ValueError ) as err :
505
+ with pytest .raises (ValueError ):
510
506
ax .set_xlim3d (right = np .inf )
511
- assert err .value .message == error_string
512
507
513
- with pytest .raises (ValueError ) as err :
508
+ with pytest .raises (ValueError ):
514
509
ax .set_ylim3d (bottom = np .nan )
515
- assert err .value .message == error_string
516
- with pytest .raises (ValueError ) as err :
510
+ with pytest .raises (ValueError ):
517
511
ax .set_ylim3d (bottom = np .inf )
518
- assert err .value .message == error_string
519
- with pytest .raises (ValueError ) as err :
512
+ with pytest .raises (ValueError ):
520
513
ax .set_ylim3d (top = np .nan )
521
- assert err .value .message == error_string
522
- with pytest .raises (ValueError ) as err :
514
+ with pytest .raises (ValueError ):
523
515
ax .set_ylim3d (top = np .inf )
524
- assert err .value .message == error_string
525
516
526
- with pytest .raises (ValueError ) as err :
517
+ with pytest .raises (ValueError ):
527
518
ax .set_zlim3d (bottom = np .nan )
528
- assert err .value .message == error_string
529
- with pytest .raises (ValueError ) as err :
519
+ with pytest .raises (ValueError ):
530
520
ax .set_zlim3d (bottom = np .inf )
531
- assert err .value .message == error_string
532
- with pytest .raises (ValueError ) as err :
521
+ with pytest .raises (ValueError ):
533
522
ax .set_zlim3d (top = np .nan )
534
- assert err .value .message == error_string
535
- with pytest .raises (ValueError ) as err :
523
+ with pytest .raises (ValueError ):
536
524
ax .set_zlim3d (top = np .inf )
537
- assert err .value .message == error_string
0 commit comments