]> jfr.im git - yt-dlp.git/blobdiff - test/test_YoutubeDL.py
[networking] Add `extensions` attribute to `Response` (#9756)
[yt-dlp.git] / test / test_YoutubeDL.py
index 0087cbc941fbf638894cc42cd67f104ae6a5470d..5242cf88f92c25613acc24c09f3e1d4905b1a66a 100644 (file)
@@ -183,7 +183,7 @@ def test_format_selection_audio_exts(self):
         ]
 
         info_dict = _make_result(formats)
-        ydl = YDL({'format': 'best'})
+        ydl = YDL({'format': 'best', 'format_sort': ['abr', 'ext']})
         ydl.sort_formats(info_dict)
         ydl.process_ie_result(copy.deepcopy(info_dict))
         downloaded = ydl.downloaded_info_dicts[0]
@@ -195,7 +195,7 @@ def test_format_selection_audio_exts(self):
         downloaded = ydl.downloaded_info_dicts[0]
         self.assertEqual(downloaded['format_id'], 'mp3-64')
 
-        ydl = YDL({'prefer_free_formats': True})
+        ydl = YDL({'prefer_free_formats': True, 'format_sort': ['abr', 'ext']})
         ydl.sort_formats(info_dict)
         ydl.process_ie_result(copy.deepcopy(info_dict))
         downloaded = ydl.downloaded_info_dicts[0]
@@ -941,7 +941,7 @@ def test_match_filter(self):
         def get_videos(filter_=None):
             ydl = YDL({'match_filter': filter_, 'simulate': True})
             for v in videos:
-                ydl.process_ie_result(v, download=True)
+                ydl.process_ie_result(v.copy(), download=True)
             return [v['id'] for v in ydl.downloaded_info_dicts]
 
         res = get_videos()