Refactor tests to improve logging configuration and enhance video renumbering logic

This commit is contained in:
dark_zoul committed 2025-11-24 11:59:57 +02:00
1 parent 4a56c03b62
commit 6ccb869c3c
3 files changed
+43 -22

No files matched your search

+5 -2
View File
@@ -36,7 +36,10 @@ def test_update_yt_dlp_failure(monkeypatch, caplog):
def test_configure_logging_sets_levels():
# ensure calling configure_logging flips global root logger level
# clear existing handlers so basicConfig can take effect in test
logging.root.handlers.clear()
cli_mod.configure_logging(True)
assert logging.getLogger().level == logging.DEBUG
assert logging.getLogger().getEffectiveLevel() == logging.DEBUG
logging.root.handlers.clear()
cli_mod.configure_logging(False)
assert logging.getLogger().level == logging.INFO
assert logging.getLogger().getEffectiveLevel() == logging.INFO