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

Method test_entryconfigure_variable

Lib/test/test_tkinter/test_widgets.py:1535–1543  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1533 self.assertEqual(m1.entrycget(1, 'label'), 'changed')
1534
1535 def test_entryconfigure_variable(self):
1536 m1 = self.create()
1537 v1 = tkinter.BooleanVar(self.root)
1538 v2 = tkinter.BooleanVar(self.root)
1539 m1.add_checkbutton(variable=v1, onvalue=True, offvalue=False,
1540 label='Nonsense')
1541 self.assertEqual(str(m1.entrycget(1, 'variable')), str(v1))
1542 m1.entryconfigure(1, variable=v2)
1543 self.assertEqual(str(m1.entrycget(1, 'variable')), str(v2))
1544
1545
1546@add_configure_tests(PixelSizeTests, StandardOptionsTests)

Callers

nothing calls this directly

Calls 6

createMethod · 0.95
strFunction · 0.85
add_checkbuttonMethod · 0.80
entrycgetMethod · 0.80
entryconfigureMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected