8000 Add rubberband in toolmanager to remove warning · matplotlib/matplotlib@3e34724 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3e34724

Browse files
Add rubberband in toolmanager to remove warning
1 parent bd04959 commit 3e34724

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/tests/test_backend_bases.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from matplotlib.backend_bases import (
44
FigureCanvasBase, LocationEvent, MouseButton, MouseEvent,
55
NavigationToolbar2, RendererBase)
6-
from matplotlib.backend_tools import (ToolZoom, ToolPan,
6+
from matplotlib.backend_tools import (ToolZoom, ToolPan, RubberbandBase,
77
ToolViewsPositions, _views_positions)
88
import matplotlib.pyplot as plt
99
import matplotlib.transforms as transforms
@@ -172,13 +172,13 @@ def test_toolbar_zoompan():
172172
tool=ToolPan)
173173
ax.figure.canvas.manager.toolmanager.add_tool(name=_views_positions,
174174
tool=ToolViewsPositions)
175+
ax.figure.canvas.manager.toolmanager.add_tool(name='rubberband',
176+
tool=RubberbandBase)
175177
ax.figure.canvas.manager.toolmanager.trigger_tool('zoom')
176178
assert ax.get_navigate_mode() == "ZOOM"
177179
ax.figure.canvas.manager.toolmanager.trigger_tool('pan')
178180
assert ax.get_navigate_mode() == "PAN"
179181
assert(len(rec) == 4)
180-
for r in rec[:-1]:
182+
for r in rec:
181183
assert("The new Tool classes introduced in v1.5 are experimental"
182184
in str(r.message))
183-
assert("ToolManager does not control tool rubberband"
184-
in str(rec[-1].message))

0 commit comments

Comments
 (0)
0