mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-14 23:32:33 +00:00
[test_YoutubeDL] Fix test_youtube_format_selection
Broken since a6c2c24479
. Thanks to
@jaimeMF and @anisse for pointing that out
This commit is contained in:
parent
fae45ede08
commit
1df4141196
1 changed files with 11 additions and 0 deletions
|
@ -248,6 +248,17 @@ class TestFormatSelection(unittest.TestCase):
|
||||||
|
|
||||||
def format_info(f_id):
|
def format_info(f_id):
|
||||||
info = YoutubeIE._formats[f_id].copy()
|
info = YoutubeIE._formats[f_id].copy()
|
||||||
|
|
||||||
|
# XXX: In real cases InfoExtractor._parse_mpd() fills up 'acodec'
|
||||||
|
# and 'vcodec', while in tests such information is incomplete since
|
||||||
|
# commit a6c2c24479e5f4827ceb06f64d855329c0a6f593
|
||||||
|
# test_YoutubeDL.test_youtube_format_selection is broken without
|
||||||
|
# this fix
|
||||||
|
if 'acodec' in info and 'vcodec' not in info:
|
||||||
|
info['vcodec'] = 'none'
|
||||||
|
elif 'vcodec' in info and 'acodec' not in info:
|
||||||
|
info['acodec'] = 'none'
|
||||||
|
|
||||||
info['format_id'] = f_id
|
info['format_id'] = f_id
|
||||||
info['url'] = 'url:' + f_id
|
info['url'] = 'url:' + f_id
|
||||||
return info
|
return info
|
||||||
|
|
Loading…
Reference in a new issue