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

Method test_bind_all

Lib/test/test_tkinter/test_misc.py:1110–1131  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1108 self.assertCommandExist(funcid3)
1109
1110 def test_bind_all(self):
1111 event = '<Control-Alt-Key-h>'
1112 bind_all = self.root.bind_all
1113 unbind_all = self.root.unbind_all
1114 self.assertNotIn(event, bind_all())
1115 self.assertEqual(bind_all(event), '')
1116 self.addCleanup(unbind_all, event)
1117 def test1(e): pass
1118 def test2(e): pass
1119
1120 funcid = bind_all(event, test1)
1121 self.assertIn(event, bind_all())
1122 script = bind_all(event)
1123 self.assertIn(funcid, script)
1124 self.assertCommandExist(funcid)
1125
1126 funcid2 = bind_all(event, test2, add=True)
1127 script = bind_all(event)
1128 self.assertIn(funcid, script)
1129 self.assertIn(funcid2, script)
1130 self.assertCommandExist(funcid)
1131 self.assertCommandExist(funcid2)
1132
1133 def test_unbind_all(self):
1134 event = '<Control-Alt-Key-i>'

Callers

nothing calls this directly

Calls 5

assertCommandExistMethod · 0.95
assertNotInMethod · 0.80
addCleanupMethod · 0.80
assertInMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected