Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mikf
GitHub Repository: mikf/gallery-dl
Path: blob/master/test/results/__init__.py
8821 views
1
# -*- coding: utf-8 -*-
2
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License version 2 as
5
# published by the Free Software Foundation.
6
7
import os
8
import functools
9
10
__directory__ = os.path.dirname(__file__)
11
12
13
@functools.lru_cache(maxsize=None)
14
def tests(name):
15
module = __import__(name, globals(), None, (), 1)
16
return module.__tests__
17
18
19
def all():
20
ignore = ("__init__.py", "__pycache__")
21
for filename in os.listdir(__directory__):
22
if filename not in ignore:
23
yield from tests(filename[:-3])
24
25
26
def category(category):
27
return tests(category.replace(".", ""))
28
29