# -*- coding: utf-8 -*-12# This program is free software; you can redistribute it and/or modify3# it under the terms of the GNU General Public License version 2 as4# published by the Free Software Foundation.56import os7import functools89__directory__ = os.path.dirname(__file__)101112@functools.lru_cache(maxsize=None)13def tests(name):14module = __import__(name, globals(), None, (), 1)15return module.__tests__161718def all():19ignore = ("__init__.py", "__pycache__")20for filename in os.listdir(__directory__):21if filename not in ignore:22yield from tests(filename[:-3])232425def category(category):26return tests(category.replace(".", ""))272829