From 93c7531412c2347fe742651de001155a1502eb19 Mon Sep 17 00:00:00 2001 From: dirkf Date: Sat, 28 Jan 2023 18:21:33 +0000 Subject: [PATCH] Use compat_[filter,map] --- test/test_download.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/test_download.py b/test/test_download.py index 16797134e..6dfa5f263 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -27,6 +27,8 @@ import re import youtube_dl.YoutubeDL from youtube_dl.compat import ( + compat_filter as filter, + compat_map as map, compat_http_client, compat_urllib_error, compat_HTTPError, @@ -279,12 +281,6 @@ for n, test_case in enumerate(defs): ie_list = ','.join(test_case.get('add_ie', [])) TestDownload.addTest(test_method, tname, ie_list) -# Py2 compat (should be in compat.py?) -try: - from itertools import (ifilter as filter, imap as map) -except ImportError: - pass - def tests_for_ie(ie_key): return filter(