def test_install_sync_handler(self): b = beat.Beat() clock = MockClockService() MockClockService.in_sync = False handlers = self.psig(b.install_sync_handler, clock) self.assertRaises(SystemExit, handlers["SIGINT"], "SIGINT", object()) self.assertTrue(MockClockService.in_sync) MockClockService.in_sync = False
def test_process_title(self): b = beat.Beat() b.set_process_title()
def test_init_loader(self): b = beat.Beat() b.init_loader()
def test_startup_info(self): b = beat.Beat() self.assertIn("@stderr", b.startup_info())
def test_loglevel_string(self): b = beat.Beat(loglevel="DEBUG") self.assertEqual(b.loglevel, logging.DEBUG) b2 = beat.Beat(loglevel=logging.DEBUG) self.assertEqual(b2.loglevel, logging.DEBUG)