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:
parent
c7bd9925d9
commit
27da3f2958
@ -407,7 +407,13 @@ def generate_tests():
|
|||||||
category, _, subcategory = sys.argv[1].partition(":")
|
category, _, subcategory = sys.argv[1].partition(":")
|
||||||
del sys.argv[1:]
|
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)
|
tests = results.category(category)
|
||||||
|
|
||||||
if subcategory:
|
if subcategory:
|
||||||
tests = [t for t in tests if t["#category"][-1] == subcategory]
|
tests = [t for t in tests if t["#category"][-1] == subcategory]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user