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

[tests] fail when a results file contains syntax errors

or is otherwise not importable
This commit is contained in:
Mike Fährmann 2023-12-30 17:26:57 +01:00
parent 085411f3f1
commit caceb14fc2
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -13,12 +13,8 @@ __directory__ = os.path.dirname(__file__)
@functools.lru_cache(maxsize=None) @functools.lru_cache(maxsize=None)
def tests(name): def tests(name):
try:
module = __import__(name, globals(), None, (), 1) module = __import__(name, globals(), None, (), 1)
return module.__tests__ return module.__tests__
except Exception as exc:
print(exc)
return ()
def all(): def all():