From 2c3e7123f197527156631efb1efc801f0da9c41f Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Sun, 25 Jan 2026 09:46:58 -0800 Subject: [PATCH] fix tests --- tests/integration/plugins/test_throttle_protection.py | 4 ++-- tests/unit/plugins/test_ytdl_options.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/integration/plugins/test_throttle_protection.py b/tests/integration/plugins/test_throttle_protection.py index 6154f70a..bd56f652 100644 --- a/tests/integration/plugins/test_throttle_protection.py +++ b/tests/integration/plugins/test_throttle_protection.py @@ -71,7 +71,7 @@ class TestThrottleProtectionPlugin: ), assert_logs( logger=throttle_protection_logger, - expected_message="Sleeping between subscriptions for %0.2f seconds", + expected_message="Sleeping between subscriptions for 0.02 seconds", log_level="info", expected_occurrences=1, ), @@ -139,7 +139,7 @@ class TestThrottleProtectionPlugin: ), assert_logs( logger=throttle_protection_logger, - expected_message="Reached subscription max downloads of %d", + expected_message="Reached subscription max downloads of 0 for throttle protection", log_level="info", expected_occurrences=1, ), diff --git a/tests/unit/plugins/test_ytdl_options.py b/tests/unit/plugins/test_ytdl_options.py index 14eef31f..e72d960e 100644 --- a/tests/unit/plugins/test_ytdl_options.py +++ b/tests/unit/plugins/test_ytdl_options.py @@ -11,6 +11,7 @@ from ytdl_sub.downloaders.ytdlp import YTDLP from ytdl_sub.subscriptions.subscription import Subscription from ytdl_sub.utils.exceptions import ValidationException from ytdl_sub.utils.ffmpeg import FFMPEG +from ytdl_sub.utils.file_path import FilePathTruncater @pytest.fixture @@ -31,7 +32,9 @@ class TestYtdlOptions: ): expected_ytdl_options = { "ignoreerrors": True, - "outtmpl": f"{working_directory}/test_ytdl_options/%(id)S.%(ext)s", + "outtmpl": FilePathTruncater.to_native_filepath( + f"{working_directory}/test_ytdl_options/%(id)S.%(ext)s" + ), "writethumbnail": False, "ffmpeg_location": FFMPEG.ffmpeg_path(), "match_filter": yt_dlp.utils.match_filter_func(