def test_context_manager__False(self): with util.alarm(0, set_signal=False) as result: self.assertFalse(result)
def _wrapped_function(self, set_signal=True): with util.alarm(1, set_signal=set_signal): return self._long_function()
def test_context_manager__True(self): with util.alarm(1) as result: self.assertTrue(result)
def handle_mutagen_task_with_alarm(self, msg): with util.alarm(2): return self.handle_mutagen_task(msg)