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

Method test_widget_destroy

Lib/test/test_ttk/test_extensions.py:207–216  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

205
206
207 def test_widget_destroy(self):
208 var = tkinter.StringVar(self.root)
209 optmenu = ttk.OptionMenu(self.root, var)
210 name = var._name
211 optmenu.update_idletasks()
212 optmenu.destroy()
213 self.assertEqual(optmenu.tk.globalgetvar(name), var.get())
214 del var
215 gc_collect() # For PyPy or other GCs.
216 self.assertRaises(tkinter.TclError, optmenu.tk.globalgetvar, name)
217
218
219 def test_initialization(self):

Callers

nothing calls this directly

Calls 6

destroyMethod · 0.95
getMethod · 0.95
gc_collectFunction · 0.90
update_idletasksMethod · 0.80
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected