예제 #1
0
 def test_set_multiple_loglevels(self):
     print('isEnabledFor(logging.DEBUG) is False with '
           'CapiceManager().critical_logging_only set to True')
     self.manager.critical_logging_only = True
     self.manager.loglevel = 10
     log = Logger().logger
     self.assertFalse(log.isEnabledFor(logging.DEBUG))
예제 #2
0
 def test_isenabled_true_warning(self):
     print('isEnabledFor(logging.WARNING) is True')
     log = Logger().logger
     self.assertTrue(log.isEnabledFor(logging.WARNING))
     self.assertFalse(log.isEnabledFor(logging.INFO))
예제 #3
0
 def test_isenabled_true_debug(self):
     print('isEnabledFor(logging.DEBUG) is True')
     self.manager.loglevel = 10
     log = Logger().logger
     self.assertTrue(log.isEnabledFor(logging.DEBUG))
예제 #4
0
 def test_isenabled_false_warning(self):
     print('isEnabledFor(logging.WARNING) is False')
     self.manager.critical_logging_only = True
     log = Logger().logger
     self.assertFalse(log.isEnabledFor(logging.WARNING))
예제 #5
0
 def test_isenbaled_false_debug(self):
     print('isEnabledFor(logging.DEBUG) is False')
     self.manager.loglevel = 20
     log = Logger().logger
     self.assertFalse(log.isEnabledFor(logging.DEBUG))