def test_callback_unauthorized_append(self):
     self.name = 'test_callback_unauthorized_append'
     signals.register_handler(signal.SIGTERM, self.set_flag_handler)
     with self.assertRaises(exceptions.MultipleSignalHandlersError):
         signals.register_callback(
             signal.SIGTERM, self.set_flag_callback, append=False, args=[None])
     os.kill(os.getpid(), signal.SIGTERM)
Beispiel #2
0
 def test_callback_unauthorized_append(self):
     self.name = 'test_callback_unauthorized_append'
     signals.register_handler(signal.SIGTERM, self.set_flag_handler)
     with self.assertRaises(exceptions.MultipleSignalHandlersError):
         signals.register_callback(signal.SIGTERM,
                                   self.set_flag_callback,
                                   append=False,
                                   args=[None])
     os.kill(os.getpid(), signal.SIGTERM)
Beispiel #3
0
 def test_handler_reset(self):
     self.name = 'test_handler_reset'
     signals.register_handler(signal.SIGTERM, self.raise_handler)
     signals.register_handler(signal.SIGTERM, self.raise_handler)
     signals.register_handler(signal.SIGTERM, self.raise_handler, reset=True)
     signals.register_handler(signal.SIGTERM, self.set_flag_handler, reset=True)
     os.kill(os.getpid(), signal.SIGTERM)
Beispiel #4
0
 def test_handler_reset(self):
     self.name = 'test_handler_reset'
     signals.register_handler(signal.SIGTERM, self.raise_handler)
     signals.register_handler(signal.SIGTERM, self.raise_handler)
     signals.register_handler(signal.SIGTERM,
                              self.raise_handler,
                              reset=True)
     signals.register_handler(signal.SIGTERM,
                              self.set_flag_handler,
                              reset=True)
     os.kill(os.getpid(), signal.SIGTERM)
Beispiel #5
0
 def test_handler(self):
     self.name = 'test_handler'
     signals.register_handler(signal.SIGTERM, self.set_flag_handler)
     os.kill(os.getpid(), signal.SIGTERM)
Beispiel #6
0
 def test_handler(self):
     self.name = 'test_handler'
     signals.register_handler(signal.SIGTERM, self.set_flag_handler)
     os.kill(os.getpid(), signal.SIGTERM)