File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2242,7 +2242,7 @@ def __init__(self,
2242
2242
constrained_layout is not None ):
2243
2243
_api .warn_external (
2244
2244
"The Figure parameters 'layout' and 'tight_layout' or "
2245
- "'constrained_layout cannot be used together. Please use "
2245
+ "'constrained_layout' cannot be used together. Please use "
2246
2246
"'layout' only." )
2247
2247
self .set_layout_engine (layout = layout )
2248
2248
elif tight_layout is not None :
Original file line number Diff line number Diff line change @@ -526,12 +526,11 @@ def test_invalid_layouts():
526
526
527
527
# Using layout + (tight|constrained)_layout warns, but the former takes
528
528
# precedence.
529
- with pytest . warns ( UserWarning , match = " Figure parameters 'layout' and "
530
- "'tight_layout' cannot" ):
529
+ wst = "The Figure parameters 'layout' and 'tight_layout' or "
530
+ with pytest . warns ( UserWarning , match = wst ):
531
531
fig = Figure (layout = 'tight' , tight_layout = False )
532
532
assert isinstance (fig .get_layout_engine (), tight_layout_engine )
533
- with pytest .warns (UserWarning , match = "Figure parameters 'layout' and "
534
- "'constrained_layout' cannot" ):
533
+ with pytest .warns (UserWarning , match = wst ):
535
534
fig = Figure (layout = 'constrained' , constrained_layout = False )
536
535
assert not isinstance (fig .get_layout_engine (), tight_layout_engine )
537
536
assert isinstance (fig .get_layout_engine (), constrained_layout_engine )
You can’t perform that action at this time.
0 commit comments