mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-11-04 15:38:14 +02:00
Refactor tests to improve logging configuration and enhance video renumbering logic
This commit is contained in:
1 parent
4a56c03b62
commit
6ccb869c3c
3 files changed
+43
-22
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user