class TestClass(object): p = panglery.Pangler()
class TestClass(object): p = panglery.Pangler() p2 = panglery.Pangler('p2')
def test_triggering_nothing(self): p = panglery.Pangler() self.assertRaises(ValueError, p.trigger)
def test_hooking_nothing(self): p = panglery.Pangler() self.assertRaises(ValueError, p.subscribe, lambda: None)
class TestClass(object): hooks = panglery.Pangler() p = panglery.PanglerAggregate('hooks')
class TestClassD(TestClassB, TestClassC): hooks = panglery.Pangler() @hooks.subscribe(event='test') def test_hookD(_, p): self.fired |= 8
class TestClassC(TestClassA): hooks = panglery.Pangler() @hooks.subscribe(event='test') def test_hookC(_, p): self.fired |= 4