Also mock `can_merge`

While `can_merge` currently always returns `True`, I think it's better to mock this to not call `FFmpegMergerPP`
pull/9862/head
sepro 2024-05-05 12:03:35 +02:00
rodzic a29030c463
commit 0795c53fcc
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -544,6 +544,7 @@ class TestFormatSelection(unittest.TestCase):
self.assertEqual(ydl._default_format_spec({'is_live': True}), 'best/bestvideo+bestaudio')
@patch('yt_dlp.postprocessor.ffmpeg.FFmpegMergerPP.available', True)
@patch('yt_dlp.postprocessor.ffmpeg.FFmpegMergerPP.can_merge', lambda _: True)
def test_default_format_spec_with_ffmpeg(self):
ydl = YDL({})
self.assertEqual(ydl._default_format_spec({}), 'bestvideo*+bestaudio/best')