1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 18:53:21 +01:00
gallery-dl/test/results/__init__.py

28 lines
669 B
Python
Raw Normal View History

2023-09-10 14:45:01 +02:00
# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
import os
import functools
__directory__ = os.path.dirname(__file__)
@functools.lru_cache(maxsize=None)
def tests(name):
module = __import__(name, globals(), None, (), 1)
return module.__tests__
2023-09-10 14:45:01 +02:00
def all():
ignore = ("__init__.py", "__pycache__")
for filename in os.listdir(__directory__):
if filename not in ignore:
yield from tests(filename[:-3])
def category(category):
return tests(category.replace(".", ""))