Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(68)  |  Call(68)  |  Derive(0)  |  Import(0)

src/p/y/py-notify-0.3.1/test/signal.py   py-notify(Download)
 
        signal.connect (test.simple_handler)
        signal.emit ()
 
        self.assert_        (signal.has_handlers ())
        signal.connect_safe (test.simple_handler)
        signal.connect_safe (test.simple_handler)
        signal.emit ()
 
        self.assert_        (signal.has_handlers ())
        signal.connect_safe (test.simple_handler, 'first', 'second', 3)
 
        signal.emit ()
        signal.emit ('a', 'b')
 
        signal.connect_safe (test.simple_keywords_handler, a = 2, b = 3)
 
        signal.emit ()
        signal.emit (b = 42)
        signal.emit ('ham')

src/p/y/py-notify-0.3.1/test/_2_5/signal.py   py-notify(Download)
    def test_connecting_1 (self):
        test   = NotifyTestObject ()
        signal = Signal ()
 
        signal.emit (1)
 
        with signal.connecting (test.simple_handler):
            signal.emit (2)
 
        signal.emit (3)
    def test_connecting_2 (self):
        test   = NotifyTestObject ()
        signal = Signal ()
 
        signal.emit (1)
 
        with nested (ignoring_exceptions (), signal.connecting (test.simple_handler)):
            signal.emit (2)