8000 Added test for horizontal and vertical orientations · matplotlib/matplotlib@25a9d02 · GitHub
[go: up one dir, main page]

Skip to content

Commit 25a9d02

Browse files
Added test for horizontal and vertical orientations
1 parent 257c4dc commit 25a9d02

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/matplotlib/tests/test_widgets.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,20 @@ def test_slider_valmin_valmax():
308308
assert slider.val == slider.valmax
309309

310310

311+
def test_slider_horizontal_vertical():
312+
fig, ax = plt.subplots()
313+
slider = widgets.Slider(ax=ax, label='', valmin=0.0, valmax=24.0,
314+
valinit=12.0, orientation='horizontal')
315+
slider.set_val(10.0):
316+
assert slider.val == 10.0
317+
318+
fig, ax = plt.subplots()
319+
slider = widgets.Slider(ax=ax, label='', valmin=0.0, valmax=24.0,
320+
valinit=12.0, orientation='vertical')
321+
slider.set_val(10.0):
322+
assert slider.val == 10.0
323+
324+
311325
def check_polygon_selector(event_sequence, expected_result, selections_count):
312326
"""Helper function to test Polygon Selector
313327

0 commit comments

Comments
 (0)
0