File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,9 @@ def test_toolbar_zoompan():
165165 plt .rcParams ['toolbar' ] = 'toolmanager'
166166 ax = plt .gca ()
167167 assert ax .get_navigate_mode () is None
168- with pytest .warns (UserWarning ) as rec :
168+ expected_warning_regex = (r"The new Tool classes introduced in "
169+ r"v[0-9]*.[0-9]* are experimental" )
170+ with pytest .warns (UserWarning , match = expected_warning_regex ) as rec :
169171 ax .figure .canvas .manager .toolmanager .add_tool (name = "zoom" ,
170172 tool = ToolZoom )
171173 ax .figure .canvas .manager .toolmanager .add_tool (name = "pan" ,
@@ -178,7 +180,3 @@ def test_toolbar_zoompan():
178180 assert ax .get_navigate_mode () == "ZOOM"
179181 ax .figure .canvas .manager .toolmanager .trigger_tool ('pan' )
180182 assert ax .get_navigate_mode () == "PAN"
181- assert (len (rec ) == 4 )
182- for r in rec :
183- assert ("The new Tool classes introduced in v1.5 are experimental"
184- in str (r .message ))
You can’t perform that action at this time.
0 commit comments