* YoutubeDL:validate_destination_filename(): Bugfix of the previous commit when -o contains a directory.

* test_YoutubeDL:test_prepare_outtmpl_and_filename(): Prevents bogus test failure.
This commit is contained in:
Teika Kazura
2025-03-11 18:21:47 +09:00
parent 4f46e5a323
commit 52d0130a37
2 changed files with 31 additions and 17 deletions
+1
View File
@@ -742,6 +742,7 @@ class TestYoutubeDL(unittest.TestCase):
params['outtmpl'] = tmpl
ydl = FakeYDL(params)
ydl._num_downloads = 1
ydl.validate_destination_filename = lambda *args: None
self.assertEqual(ydl.validate_outtmpl(tmpl), None)
out = ydl.evaluate_outtmpl(tmpl, info or self.outtmpl_info)