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