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

Method test_initialization

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

Source from the content-addressed store, hash-verified

217
218
219 def test_initialization(self):
220 self.assertRaises(tkinter.TclError,
221 ttk.OptionMenu, self.root, self.textvar, invalid='thing')
222
223 optmenu = ttk.OptionMenu(self.root, self.textvar, 'b', 'a', 'b')
224 self.assertEqual(optmenu._variable.get(), 'b')
225
226 self.assertTrue(optmenu['menu'])
227 self.assertTrue(optmenu['textvariable'])
228
229 optmenu.destroy()
230
231
232 def test_menu(self):

Callers

nothing calls this directly

Calls 5

destroyMethod · 0.95
assertTrueMethod · 0.80
assertRaisesMethod · 0.45
assertEqualMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected