from __future__ import annotations from audiobooksorter.logging import configure_logging def test_configure_logging_reuses_logger() -> None: logger = configure_logging("audiobooksorter-tests") logger.info("hello") # calling again should not attach additional handlers logger_again = configure_logging("audiobooksorter-tests") assert logger is logger_again assert len(logger.handlers) == 1