示例#1
0
 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
示例#2
0
 def test_process_title(self):
     b = beat.Beat()
     b.set_process_title()
示例#3
0
 def test_init_loader(self):
     b = beat.Beat()
     b.init_loader()
示例#4
0
 def test_startup_info(self):
     b = beat.Beat()
     self.assertIn("@stderr", b.startup_info())
示例#5
0
    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)