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

Method test_entryconfigure

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

Source from the content-addressed store, hash-verified

1510 sort=tk_version >= (8, 7))
1511
1512 def test_entryconfigure(self):
1513 m1 = self.create()
1514 m1.add_command(label='test')
1515 self.assertRaises(TypeError, m1.entryconfigure)
1516 with self.assertRaisesRegex(TclError, 'bad menu entry index "foo"'):
1517 m1.entryconfigure('foo')
1518 d = m1.entryconfigure(1)
1519 self.assertIsInstance(d, dict)
1520 for k, v in d.items():
1521 self.assertIsInstance(k, str)
1522 self.assertIsInstance(v, tuple)
1523 self.assertEqual(len(v), 5)
1524 self.assertEqual(v[0], k)
1525 self.assertEqual(m1.entrycget(1, k), v[4])
1526 m1.destroy()
1527
1528 def test_entryconfigure_label(self):
1529 m1 = self.create()

Callers

nothing calls this directly

Calls 10

createMethod · 0.95
add_commandMethod · 0.80
assertRaisesRegexMethod · 0.80
entryconfigureMethod · 0.80
assertIsInstanceMethod · 0.80
entrycgetMethod · 0.80
assertRaisesMethod · 0.45
itemsMethod · 0.45
assertEqualMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected