Пример #1
0
 def test_output_debug(self):
     log = Logger('test', file_name=self.test_path+'test_file.log')
     log.debug('Testing DEBUG')
     log.set_level(Logger.DEBUG)
     log.debug('Testing DEBUG')
     
     assert filecmp.cmp(self.golden_data_path+'output_debug.log', self.test_path+'test_file.log')
Пример #2
0
    def test_set_level(self):
        log = Logger('test')

        log.set_level(Logger.DEBUG)
        assert Logger.DEBUG == log.get_level()

        log.set_level('a')
        assert Logger.DEBUG == log.get_level()

        log.set_level('-1')
        assert Logger.DEBUG == log.get_level()