diff options
| author | 2025-07-31 01:22:01 -0400 | |
|---|---|---|
| committer | 2025-07-31 01:22:01 -0400 | |
| commit | a6e995c093de8aae2e91a0787281bb34c0b871eb (patch) | |
| tree | 2d79821b05300d34d8871eb6c9662b359a2de85d /test/test_ytdl.py | |
| parent | 7672a750cb74bf31e21d76aad2776367fd476155 (diff) | |
New upstream version 1.30.2.upstream/1.30.2
Diffstat (limited to 'test/test_ytdl.py')
| -rw-r--r-- | test/test_ytdl.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/test_ytdl.py b/test/test_ytdl.py index f7eb671..ecc6d2f 100644 --- a/test/test_ytdl.py +++ b/test/test_ytdl.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2022-2023 Mike Fährmann +# Copyright 2022-2025 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -26,6 +26,7 @@ class Test_CommandlineArguments(unittest.TestCase): raise unittest.SkipTest("cannot import module '{}'".format( cls.module_name)) cls.default = ytdl.parse_command_line(cls.module, []) + cls.ytdlp = hasattr(cls.module, "cookies") def test_ignore_errors(self): self._("--ignore-errors" , "ignoreerrors", True) @@ -155,21 +156,21 @@ class Test_CommandlineArguments(unittest.TestCase): def test_subs(self): opts = self._(["--convert-subs", "srt"]) conv = {"key": "FFmpegSubtitlesConvertor", "format": "srt"} - if self.module_name == "yt_dlp": + if self.ytdlp: conv["when"] = "before_dl" self.assertEqual(opts["postprocessors"][0], conv) def test_embed(self): subs = {"key": "FFmpegEmbedSubtitle"} thumb = {"key": "EmbedThumbnail", "already_have_thumbnail": False} - if self.module_name == "yt_dlp": + if self.ytdlp: subs["already_have_subtitle"] = False opts = self._(["--embed-subs", "--embed-thumbnail"]) self.assertEqual(opts["postprocessors"][:2], [subs, thumb]) thumb["already_have_thumbnail"] = True - if self.module_name == "yt_dlp": + if self.ytdlp: subs["already_have_subtitle"] = True thumb["already_have_thumbnail"] = "all" @@ -212,7 +213,7 @@ class Test_CommandlineArguments(unittest.TestCase): "--ignore-config", ] - if self.module_name != "yt_dlp": + if not self.ytdlp: cmdline.extend(( "--dump-json", "--dump-single-json", |
