"""
Test for logger functionality using tkinter_logger submodule.

The old custom logger has been replaced by the tkinter_logger submodule.
Original tests for the old implementation have been removed.
"""

import logging
from tkinter_logger import get_logger


def test_get_logger_basic():
    """Test that get_logger returns a valid logger."""
    logger = get_logger("test.module")
    assert logger is not None
    assert isinstance(logger, logging.Logger)
    assert logger.name == "test.module"


def test_logger_hierarchy():
    """Test that loggers follow Python logging hierarchy."""
    parent = get_logger("pyucc")
    child = get_logger("pyucc.core")
    
    assert parent is not None
    assert child is not None
    # Child logger's name should start with parent's name
    assert child.name.startswith(parent.name + ".")


def test_logger_levels():
    """Test that logger levels can be set."""
    logger = get_logger("test.levels")
    
    logger.setLevel(logging.DEBUG)
    assert logger.level == logging.DEBUG
    
    logger.setLevel(logging.INFO)
    assert logger.level == logging.INFO
    
    logger.setLevel(logging.WARNING)
    assert logger.level == logging.WARNING
