Beispiel #1
0
 class TestClass(object):
     p = panglery.Pangler()
Beispiel #2
0
 class TestClass(object):
     p = panglery.Pangler()
     p2 = panglery.Pangler('p2')
Beispiel #3
0
 def test_triggering_nothing(self):
     p = panglery.Pangler()
     self.assertRaises(ValueError, p.trigger)
Beispiel #4
0
 def test_hooking_nothing(self):
     p = panglery.Pangler()
     self.assertRaises(ValueError, p.subscribe, lambda: None)
Beispiel #5
0
 class TestClass(object):
     hooks = panglery.Pangler()
     p = panglery.PanglerAggregate('hooks')
Beispiel #6
0
        class TestClassD(TestClassB, TestClassC):
            hooks = panglery.Pangler()

            @hooks.subscribe(event='test')
            def test_hookD(_, p):
                self.fired |= 8
Beispiel #7
0
        class TestClassC(TestClassA):
            hooks = panglery.Pangler()

            @hooks.subscribe(event='test')
            def test_hookC(_, p):
                self.fired |= 4