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

Method test_element_create_vsapi_1

Lib/test/test_ttk/test_style.py:263–277  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

261 style.element_create('block2', 'image', image, spam=1)
262
263 def test_element_create_vsapi_1(self):
264 style = self.style
265 if 'xpnative' not in style.theme_names():
266 self.skipTest("requires 'xpnative' theme")
267 style.element_create('smallclose', 'vsapi', 'WINDOW', 19, [
268 ('disabled', 4),
269 ('pressed', 3),
270 ('active', 2),
271 ('', 1)])
272 style.layout('CloseButton',
273 [('CloseButton.smallclose', {'sticky': 'news'})])
274 b = ttk.Button(self.root, style='CloseButton')
275 b.pack(expand=True, fill='both')
276 self.assertEqual(b.winfo_reqwidth(), 13)
277 self.assertEqual(b.winfo_reqheight(), 13)
278
279 def test_element_create_vsapi_2(self):
280 style = self.style

Callers

nothing calls this directly

Calls 8

theme_namesMethod · 0.80
skipTestMethod · 0.80
element_createMethod · 0.80
layoutMethod · 0.80
winfo_reqwidthMethod · 0.80
winfo_reqheightMethod · 0.80
packMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected