Files
letta-server/tests/test_log.py
Max Blackmer abf4fb03bd [cpacker#319] fixed error with config with improper include in config.py
added test_log.py. for testing global logging in log.py
2024-01-11 10:44:20 -05:00

17 lines
448 B
Python

import logging
from memgpt.log import logger
from memgpt.constants import LOGGER_LOG_LEVELS
import pytest
def test_log_debug():
# test setting logging level
assert logging.DEBUG == LOGGER_LOG_LEVELS["DEBUG"]
logger.setLevel(LOGGER_LOG_LEVELS["DEBUG"])
assert logger.isEnabledFor(logging.DEBUG)
# Assert that the message was logged
assert logger.hasHandlers()
logger.debug("This is a Debug message")
assert 1 == 1