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

Method test_same_name

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

Source from the content-addressed store, hash-verified

252 self.assertEqual(len(set(variables)), 4, variables)
253
254 def test_same_name(self):
255 f1 = tkinter.Frame(self.root)
256 f2 = tkinter.Frame(self.root)
257 b1 = tkinter.Checkbutton(f1, name='test', text='Test1')
258 b2 = tkinter.Checkbutton(f2, name='test', text='Test2')
259
260 v = tkinter.IntVar(self.root, name='test')
261 b1.select()
262 self.assertEqual(v.get(), 1)
263 b2.deselect()
264 self.assertEqual(v.get(), 0)
265
266@add_configure_tests(StandardOptionsTests)
267class RadiobuttonTest(AbstractLabelTest, unittest.TestCase):

Callers

nothing calls this directly

Calls 4

selectMethod · 0.95
getMethod · 0.95
deselectMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected