MCPcopy Index your code
hub / github.com/python/cpython / test_virtual_event

Method test_virtual_event

Lib/test/test_ttk/test_widgets.py:498–517  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

496 self.combo.event_generate('<ButtonRelease-1>', x=x, y=y)
497
498 def test_virtual_event(self):
499 if (tk_version >= (9, 0) and sys.platform == 'darwin'
500 and isinstance(self.entry, ttk.Combobox)):
501 self.skipTest('Test does not work on macOS Tk 9.')
502 # https://core.tcl-lang.org/tk/tktview/8b49e9cfa6
503 success = []
504
505 self.combo['values'] = [1]
506 self.combo.bind('<<ComboboxSelected>>',
507 lambda evt: success.append(True))
508 self.combo.pack()
509 self.combo.update()
510
511 height = self.combo.winfo_height()
512 self._show_drop_down_listbox()
513 self.combo.update()
514 self.combo.event_generate('<Return>')
515 self.combo.update()
516
517 self.assertTrue(success)
518
519 def test_configure_postcommand(self):
520 if (tk_version >= (9, 0) and sys.platform == 'darwin'

Callers

nothing calls this directly

Calls 9

skipTestMethod · 0.80
winfo_heightMethod · 0.80
event_generateMethod · 0.80
assertTrueMethod · 0.80
bindMethod · 0.45
appendMethod · 0.45
packMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected