for some reason the impl was different here than that of 0.8
return (self.parent_listeners)[index]
def __nonzero__(self):
- return bool(self.listeners)
+ return bool(self.parent_listeners)
class _ListenerCollection(object):
eq_(len(self.Target().dispatch.event_two), 0)
eq_(len(t1.dispatch.event_two), 0)
+ def test_bool_clslevel(self):
+ def listen_one(x, y):
+ pass
+ event.listen(self.Target, "event_one", listen_one)
+ t = self.Target()
+ assert t.dispatch.event_one
+
def test_register_class_instance(self):
def listen_one(x, y):
pass