mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-22 22:34:01 -07:00
Condense filters
Co-authored-by: Simon Sawicki <accounts@grub4k.xyz>
This commit is contained in:
parent
5ab2dbeced
commit
e48a9ae20e
1 changed files with 5 additions and 6 deletions
|
@ -310,13 +310,12 @@ def gen_test_suite(ie_key):
|
||||||
|
|
||||||
|
|
||||||
for ie_key in set(
|
for ie_key in set(
|
||||||
map(lambda x: x[0],
|
map(lambda a: a[5:],
|
||||||
filter(
|
filter(
|
||||||
lambda x: callable(x[1]),
|
lambda x: callable(getattr(TestDownload, x, None)),
|
||||||
map(lambda a: (a[5:], getattr(TestDownload, a, None)),
|
filter(
|
||||||
filter(lambda t:
|
lambda t: re.match(r"test_.+(?<!(?:_all|.._\d|._\d\d|_\d\d\d))$", t),
|
||||||
re.match(r'test_.+(?<!(?:_all|.._\d|._\d\d|_\d\d\d))$', t),
|
dir(TestDownload))))):
|
||||||
dir(TestDownload)))))):
|
|
||||||
test_all = gen_test_suite(ie_key)
|
test_all = gen_test_suite(ie_key)
|
||||||
TestDownload.addTest(test_all, 'test_%s_all' % ie_key, 'Test all: %s' % ie_key)
|
TestDownload.addTest(test_all, 'test_%s_all' % ie_key, 'Test all: %s' % ie_key)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue