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

Method setUpClass

Lib/test/test_tkinter/support.py:16–30  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

14
15 @classmethod
16 def setUpClass(cls):
17 cls._old_support_default_root = tkinter._support_default_root
18 destroy_default_root()
19 tkinter.NoDefaultRoot()
20 cls.root = tkinter.Tk()
21 cls.wantobjects = cls.root.wantobjects()
22 if support.is_resource_enabled('wantobjects'):
23 assert cls.wantobjects == int(support.get_resource_value('wantobjects'))
24 # De-maximize main window.
25 # Some window managers can maximize new windows.
26 cls.root.wm_state('normal')
27 try:
28 cls.root.wm_attributes(zoomed=False)
29 except tkinter.TclError:
30 pass
31
32 @classmethod
33 def tearDownClass(cls):

Callers

nothing calls this directly

Calls 4

destroy_default_rootFunction · 0.85
wantobjectsMethod · 0.80
wm_stateMethod · 0.80
wm_attributesMethod · 0.80

Tested by

no test coverage detected