1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 12:12:34 +01:00

[tests] re-implement filtering by basecategory

This commit is contained in:
Mike Fährmann 2023-10-01 13:31:23 +02:00
parent c7bd9925d9
commit 27da3f2958
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -407,7 +407,13 @@ def generate_tests():
category, _, subcategory = sys.argv[1].partition(":")
del sys.argv[1:]
if category.startswith("+"):
basecategory = category[1:].lower()
tests = [t for t in results.all()
if t["#category"][0].lower() == basecategory]
else:
tests = results.category(category)
if subcategory:
tests = [t for t in tests if t["#category"][-1] == subcategory]
else: