You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mouse testing for RangeSlider widget is not supported in the current widget testing framework. The current mouse testing for widgets is done using the click_and_drag function, but it has no support for widgets without 'press' events.
Proposed fix
The click_and_drag function should be generalized in order to support more widgets. One solution would be adding support for sending events through the canvas.
Activity
andrew-fennell commentedon Mar 28, 2022
The
click_and_dragfunction:matplotlib/lib/matplotlib/testing/widgets.py
Line 92 in 2e921df
The
click_and_dragfunction is currently moving the mouse with these function calls:matplotlib/lib/matplotlib/testing/widgets.py
Lines 112 to 114 in 2e921df
This is where the current tests will break when using a RangeSlider widget because there is no 'press' event.
matplotlib/lib/matplotlib/testing/widgets.py
Line 88 in 2e921df
The click events are defined in
SliderBase:matplotlib/lib/matplotlib/widgets.py
Lines 275 to 279 in 2e921df
ianhi commentedon Mar 28, 2022
I think the core issue is that
do_eventcalls methods on the widget rather than actually processing events through the canvas.So changing:
matplotlib/lib/matplotlib/testing/widgets.py
Lines 87 to 89 in 2e921df
to be something like
would more completely exercise the events mechanism and be more general