Adjust patch target

This commit is contained in:
sepro 2024-05-05 16:46:05 +02:00
parent 0795c53fcc
commit de5634edf4

View file

@ -522,7 +522,7 @@ def test_format_filtering(self):
pass
self.assertEqual(ydl.downloaded_info_dicts, [])
@patch('yt_dlp.postprocessor.ffmpeg.FFmpegMergerPP.available', False)
@patch('yt_dlp.YoutubeDL.FFmpegMergerPP.available', False)
def test_default_format_spec_without_ffmpeg(self):
ydl = YDL({})
self.assertEqual(ydl._default_format_spec({}), 'best/bestvideo+bestaudio')
@ -543,8 +543,8 @@ def test_default_format_spec_without_ffmpeg(self):
self.assertEqual(ydl._default_format_spec({}, download=False), 'bestvideo*+bestaudio/best')
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)
@patch('yt_dlp.YoutubeDL.FFmpegMergerPP.available', True)
@patch('yt_dlp.YoutubeDL.FFmpegMergerPP.can_merge', lambda _: True)
def test_default_format_spec_with_ffmpeg(self):
ydl = YDL({})
self.assertEqual(ydl._default_format_spec({}), 'bestvideo*+bestaudio/best')