(self)
| 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>' |
nothing calls this directly
no test coverage detected