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

Method _test_widget

Lib/test/test_tkinter/support.py:62–72  ·  view source on GitHub ↗
(self, constructor)

Source from the content-addressed store, hash-verified

60 tkinter._support_default_root = self._old_support_default_root
61
62 def _test_widget(self, constructor):
63 # no master passing
64 x = constructor()
65 self.assertIsNotNone(tkinter._default_root)
66 self.assertIs(x.master, tkinter._default_root)
67 self.assertIs(x.tk, tkinter._default_root.tk)
68 x.destroy()
69 destroy_default_root()
70 tkinter.NoDefaultRoot()
71 self.assertRaises(RuntimeError, constructor)
72 self.assertNotHasAttr(tkinter, '_default_root')
73
74
75def destroy_default_root():

Callers 5

test_frameMethod · 0.80
test_labelMethod · 0.80
test_frameMethod · 0.80
test_labelMethod · 0.80
test_labeledscaleMethod · 0.80

Calls 7

constructorFunction · 0.85
destroy_default_rootFunction · 0.85
assertIsNotNoneMethod · 0.80
assertNotHasAttrMethod · 0.80
assertIsMethod · 0.45
destroyMethod · 0.45
assertRaisesMethod · 0.45

Tested by 5

test_frameMethod · 0.64
test_labelMethod · 0.64
test_frameMethod · 0.64
test_labelMethod · 0.64
test_labeledscaleMethod · 0.64