PicoAudio2 / utils /tests /test_logging.py
rookie9's picture
Upload 77 files
f582ec6 verified
raw
history blame contribute delete
557 Bytes
import unittest
from pathlib import Path
from utils.logging import LoggingLogger
class TestLoggingLogger(unittest.TestCase):
def setUp(self):
self.tmp_log_path = Path("./tmp_logging.txt")
def test_logging_info(self):
logger = LoggingLogger(filename=self.tmp_log_path,
level="INFO").create_instance()
logger.info("logging information")
self.assertTrue(self.tmp_log_path.exists())
def tearDown(self):
if self.tmp_log_path.exists():
self.tmp_log_path.unlink()