Skip to content

Commit 3db734f

Browse files
authored
Update test_widgets.py
1 parent 540f14c commit 3db734f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/matplotlib/tests/test_widgets.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,15 +343,18 @@ def test_TextBox():
343343
tool = widgets.TextBox(ax, 'Evaluate')
344344
tool.on_submit(submit_event)
345345
tool.on_text_change(text_change_event)
346-
tool.set_val('x**2')
346+
tool.set_val('')
347347

348-
assert tool.text == 'x**2'
348+
assert tool.text == ''
349349
assert text_change_event.call_count == 1
350350

351351
tool.begin_typing(tool.text)
352352
tool.stop_typing()
353-
353+
do_event(tool, '_click')
354+
354355
assert submit_event.call_count == 2
356+
357+
tool.set_val('x**2')
355358
do_event(tool, '_click')
356359
do_event(tool, '_keypress', key='+')
357360
do_event(tool, '_keypress', key='5')

0 commit comments

Comments
 (0)