@@ -5734,21 +5734,17 @@ def test_set_margin_updates_limits():
57345734 assert ax .get_xlim () == (1 , 2 )
57355735
57365736
5737- @pytest .mark .parametrize ('err, args, kwargs, match' ,
5738- ((ValueError , (- 1 ,), {},
5739- 'margin must be greater than -0.5' ),
5740- (ValueError , (1 , - 1 ), {},
5741- 'margin must be greater than -0.5' ),
5742- (ValueError , tuple (), {'x' : - 1 },
5743- 'margin must be greater than -0.5' ),
5744- (ValueError , tuple (), {'y' : - 1 },
5745- 'margin must be greater than -0.5' ),
5746- (TypeError , (1 , ), {'x' : 1 , 'y' : 1 },
5747- 'Cannot pass both positional and keyword '
5748- 'arguments for x and/or y.' ),
5749- (TypeError , (1 , 1 , 1 ), {},
5750- 'Must pass a single positional argument for all*' ),
5751- ))
5737+ @pytest .mark .parametrize ('err, args, kwargs, match' , (
5738+ (ValueError , (- 1 ,), {}, r'margin must be greater than -0\.5' ),
5739+ (ValueError , (1 , - 1 ), {}, r'margin must be greater than -0\.5' ),
5740+ (ValueError , tuple (), {'x' : - 1 }, r'margin must be greater than -0\.5' ),
5741+ (ValueError , tuple (), {'y' : - 1 }, r'margin must be greater than -0\.5' ),
5742+ (TypeError , (1 , ), {'x' : 1 , 'y' : 1 },
5743+ 'Cannot pass both positional and keyword arguments for x and/or y' ),
5744+ (TypeError , (1 , ), {'x' : 1 },
5745+ 'Cannot pass both positional and keyword arguments for x and/or y' ),
5746+ (TypeError , (1 , 1 , 1 ), {}, 'Must pass a single positional argument' ),
5747+ ))
57525748def test_margins_errors (err , args , kwargs , match ):
57535749 with pytest .raises (err , match = match ):
57545750 fig = plt .figure ()
0 commit comments