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

Method test_element_create_vsapi_2

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

Source from the content-addressed store, hash-verified

277 self.assertEqual(b.winfo_reqheight(), 13)
278
279 def test_element_create_vsapi_2(self):
280 style = self.style
281 if 'xpnative' not in style.theme_names():
282 self.skipTest("requires 'xpnative' theme")
283 style.element_create('pin', 'vsapi', 'EXPLORERBAR', 3, [
284 ('pressed', '!selected', 3),
285 ('active', '!selected', 2),
286 ('pressed', 'selected', 6),
287 ('active', 'selected', 5),
288 ('selected', 4),
289 ('', 1)])
290 style.layout('Explorer.Pin',
291 [('Explorer.Pin.pin', {'sticky': 'news'})])
292 pin = ttk.Checkbutton(self.root, style='Explorer.Pin')
293 pin.pack(expand=True, fill='both')
294 self.assertEqual(pin.winfo_reqwidth(), 16)
295 self.assertEqual(pin.winfo_reqheight(), 16)
296
297 def test_element_create_vsapi_3(self):
298 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