2023-10-25 00:36:57 +08:00
|
|
|
# -------------------------------
|
|
|
|
# Difficult Rocket
|
|
|
|
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
|
|
|
|
# All rights reserved
|
|
|
|
# -------------------------------
|
|
|
|
|
|
|
|
import unittest
|
|
|
|
|
|
|
|
from lib_not_dr.logger.formatter import BaseFormatter, TimeFormatter, LevelFormatter
|
2023-10-25 06:20:26 +08:00
|
|
|
from lib_not_dr.logger.structers import LogMessage
|
2023-10-25 00:36:57 +08:00
|
|
|
|
|
|
|
|
|
|
|
class FormatterTest(unittest.TestCase):
|
|
|
|
|
|
|
|
def test_formatter(self):
|
|
|
|
formatter = BaseFormatter()
|
|
|
|
formatter.info()
|
|
|
|
|
|
|
|
def test_time_formatter(self):
|
|
|
|
formatter = TimeFormatter()
|
|
|
|
formatter.info()
|
|
|
|
|
|
|
|
def test_level_formatter(self):
|
|
|
|
formatter = LevelFormatter()
|
|
|
|
formatter.info()
|
2023-10-25 06:20:26 +08:00
|
|
|
|
|
|
|
def test_std_formatter(self):
|
|
|
|
formatter = BaseFormatter()
|
|
|
|
formatter.info()
|