コード例 #1
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()
コード例 #2
0
    def test_create_default_logger(self):
        log = Logger('test')

        assert Logger.INFO == log.get_level()
        assert log.get_tag() == "test"