[YoutubeDL] Ignore duplicates in --playlist-items
[youtube-dl] / test / test_YoutubeDL.py
index e70cbcd375a4670bb586612ccaa107605dc985dc..db936bfb88d4bd0a05be1cc6fd7d1b18ce3a72b6 100644 (file)
@@ -770,6 +770,12 @@ class TestYoutubeDL(unittest.TestCase):
         result = get_ids({'playlist_items': '10'})
         self.assertEqual(result, [])
 
+        result = get_ids({'playlist_items': '3-10'})
+        self.assertEqual(result, [3, 4])
+
+        result = get_ids({'playlist_items': '2-4,3-4,3'})
+        self.assertEqual(result, [2, 3, 4])
+
     def test_urlopen_no_file_protocol(self):
         # see https://github.com/rg3/youtube-dl/issues/8227
         ydl = YDL()