diff options
author | Aakash Gajjar <skyqutip@gmail.com> | 2020-08-26 20:22:32 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-26 20:22:32 +0530 |
commit | 19a107f21c7544b5e49a58040d09d9465f6858b1 (patch) | |
tree | 8325ffd206d9da1ce53f24b9ab4690abe175144d /test/test_YoutubeDL.py | |
parent | 7f7edf837c1af059f64a4968b942a83f86cf6206 (diff) | |
download | hypervideo-pre-19a107f21c7544b5e49a58040d09d9465f6858b1.tar.lz hypervideo-pre-19a107f21c7544b5e49a58040d09d9465f6858b1.tar.xz hypervideo-pre-19a107f21c7544b5e49a58040d09d9465f6858b1.zip |
Revert "pull changes from remote master (#190)" (#193)
This reverts commit b827ee921fe510a8730a9fab070148ed2b8279b5.
Diffstat (limited to 'test/test_YoutubeDL.py')
-rw-r--r-- | test/test_YoutubeDL.py | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index 1e204e551..ce9666171 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -816,15 +816,11 @@ class TestYoutubeDL(unittest.TestCase): 'webpage_url': 'http://example.com', } - def get_downloaded_info_dicts(params): - ydl = YDL(params) - # make a deep copy because the dictionary and nested entries - # can be modified - ydl.process_ie_result(copy.deepcopy(playlist)) - return ydl.downloaded_info_dicts - def get_ids(params): - return [int(v['id']) for v in get_downloaded_info_dicts(params)] + ydl = YDL(params) + # make a copy because the dictionary can be modified + ydl.process_ie_result(playlist.copy()) + return [int(v['id']) for v in ydl.downloaded_info_dicts] result = get_ids({}) self.assertEqual(result, [1, 2, 3, 4]) @@ -856,22 +852,6 @@ class TestYoutubeDL(unittest.TestCase): result = get_ids({'playlist_items': '2-4,3-4,3'}) self.assertEqual(result, [2, 3, 4]) - # Tests for https://github.com/ytdl-org/youtube-dl/issues/10591 - # @{ - result = get_downloaded_info_dicts({'playlist_items': '2-4,3-4,3'}) - self.assertEqual(result[0]['playlist_index'], 2) - self.assertEqual(result[1]['playlist_index'], 3) - - result = get_downloaded_info_dicts({'playlist_items': '2-4,3-4,3'}) - self.assertEqual(result[0]['playlist_index'], 2) - self.assertEqual(result[1]['playlist_index'], 3) - self.assertEqual(result[2]['playlist_index'], 4) - - result = get_downloaded_info_dicts({'playlist_items': '4,2'}) - self.assertEqual(result[0]['playlist_index'], 4) - self.assertEqual(result[1]['playlist_index'], 2) - # @} - def test_urlopen_no_file_protocol(self): # see https://github.com/ytdl-org/youtube-dl/issues/8227 ydl = YDL() |