Refactor tests to improve logging configuration and enhance video renumbering logic

This commit is contained in:
2025-11-24 11:59:57 +02:00
parent 4a56c03b62
commit 6ccb869c3c
3 changed files with 43 additions and 22 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ def test_download_video_both_mode_ffmpeg_missing(monkeypatch, tmp_path, caplog):
video = {"id": "X1", "title": "Test"}
# monkeypatch _run to simulate successful video download and ffmpeg extraction failure path
def fake_run(args, check=True, stdout=None, stderr=None, text=None):
# simulate successful yt-dlp or ffmpeg calls by returning a simple object
def fake_run(*args, **kwargs):
# accept label or other kwargs; simulate successful call
return subprocess.CompletedProcess(args, 0)
monkeypatch.setattr(PlaylistDownloader, "_run", fake_run)