84
84
self.assertEquals(called, [marker, marker])
86
def test_save_restore(self):
89
def callback1(owner, arg):
91
def callback2(owner, arg):
94
self.event.hook("event", callback1)
96
self.event.hook("event", callback2)
97
self.event.unhook("event", callback1)
98
self.event.emit("event", 1)
99
self.event.emit("event", 2)
101
self.event.emit("event", 3)
102
self.event.emit("event", 4)
103
self.event.hook("event", callback2)
104
self.event.unhook("event", callback1)
105
self.event.emit("event", 5)
106
self.event.emit("event", 6)
108
self.event.emit("event", 7)
109
self.event.emit("event", 8)
111
self.assertEquals(called1, [3, 4, 7, 8])
112
self.assertEquals(called2, [1, 2, 5, 6])
114
86
def test_weak_reference(self):