Example #1
0
 def testSimpleHandlers(self):
     handlers = map(lambda _: Handler(self.signum), range(3))
     self.assert_called([0, 0, 0], handlers)
     yield self.kill()
     self.assert_called([1, 1, 1], handlers)
     handlers[0].destroy()
     yield self.kill()
     self.assert_called([1, 2, 2], handlers)
     signal.reset()
Example #2
0
 def testLegacyHandler(self):
     legacy = Handler(self.signum, signal=python_signal)
     yield self.kill()
     self.assert_called([1], [legacy])
     handler = Handler(self.signum)
     yield self.kill()
     self.assert_called([1, 2], [handler, legacy])
     handler.destroy()
     yield self.kill()
     self.assert_called([1, 3], [handler, legacy])
     handler2 = Handler(self.signum)
     self.assert_called([1, 3, 0], [handler, legacy, handler2])
     yield self.kill()
     self.assert_called([1, 4, 1], [handler, legacy, handler2])
     signal.reset()
     yield self.kill()
     self.assert_called([1, 5, 1], [handler, legacy, handler2])
Example #3
0
 def tearDown(self):
     time.reset()
     signal.reset()
Example #4
0
File: common.py Project: f3at/feat
 def tearDown(self):
     log.test_reset()
     time.reset()
     signal.reset()