1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-17 06:35:42 +07:00

[test_YoutubeDL] Fix get_ids

This commit is contained in:
Sergey M․
2020-02-15 03:30:06 +07:00
parent de1121d749
commit e0abaab293

View File

@@ -818,8 +818,9 @@ def test_playlist_items_selection(self):
def get_ids(params): def get_ids(params):
ydl = YDL(params) ydl = YDL(params)
# make a copy because the dictionary can be modified # make a deep copy because the dictionary and nested entries
ydl.process_ie_result(playlist.copy()) # can be modified
ydl.process_ie_result(copy.deepcopy(playlist))
return [int(v['id']) for v in ydl.downloaded_info_dicts] return [int(v['id']) for v in ydl.downloaded_info_dicts]
result = get_ids({}) result = get_ids({})