Esempio n. 1
0
 def test_getlevelint(self):
     """Test the getLevelInt"""
     DEBUG = fancylogger.getLevelInt("DEBUG")
     INFO = fancylogger.getLevelInt("INFO")
     WARNING = fancylogger.getLevelInt("WARNING")
     ERROR = fancylogger.getLevelInt("ERROR")
     CRITICAL = fancylogger.getLevelInt("CRITICAL")
     APOCALYPTIC = fancylogger.getLevelInt("APOCALYPTIC")
     self.assertTrue(INFO > DEBUG)
     self.assertTrue(WARNING > INFO)
     self.assertTrue(ERROR > WARNING)
     self.assertTrue(CRITICAL > ERROR)
     self.assertTrue(APOCALYPTIC > CRITICAL)
Esempio n. 2
0
 def test_getlevelint(self):
     """Test the getLevelInt"""
     DEBUG = fancylogger.getLevelInt('DEBUG')
     INFO = fancylogger.getLevelInt('INFO')
     WARNING = fancylogger.getLevelInt('WARNING')
     ERROR = fancylogger.getLevelInt('ERROR')
     CRITICAL = fancylogger.getLevelInt('CRITICAL')
     APOCALYPTIC = fancylogger.getLevelInt('APOCALYPTIC')
     self.assertTrue(INFO > DEBUG)
     self.assertTrue(WARNING > INFO)
     self.assertTrue(ERROR > WARNING)
     self.assertTrue(CRITICAL > ERROR)
     self.assertTrue(APOCALYPTIC > CRITICAL)
Esempio n. 3
0
 def test_loglevel(self):
     """Test the loglevel default setting"""
     topt = TestOption1(go_args=['--ext-optional=REALVALUE'], go_nosystemexit=True,)
     self.assertEqual(topt.log.getEffectiveLevel(), fancylogger.getLevelInt(topt.DEFAULT_LOGLEVEL.upper()))