1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 12:12:34 +01:00

[tests] load results from ${GDL_TEST_RESULTS} (#5262)

This commit is contained in:
Mike Fährmann 2024-07-22 18:05:37 +02:00
parent 3b26748264
commit 3eba1f7c29
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 13 additions and 3 deletions

View File

@ -17,7 +17,7 @@ import string
from datetime import datetime, timedelta
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from gallery_dl import extractor # noqa E402
from gallery_dl import extractor, util # noqa E402
from gallery_dl.extractor import mastodon # noqa E402
from gallery_dl.extractor.common import Extractor, Message # noqa E402
from gallery_dl.extractor.directlink import DirectlinkExtractor # noqa E402
@ -25,7 +25,11 @@ from gallery_dl.extractor.directlink import DirectlinkExtractor # noqa E402
_list_classes = extractor._list_classes
try:
from test import results
RESULTS = os.environ.get("GDL_TEST_RESULTS")
if RESULTS:
results = util.import_file(RESULTS)
else:
from test import results
except ImportError:
results = None

View File

@ -20,7 +20,13 @@ import collections
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from gallery_dl import \
extractor, util, job, config, exception, formatter # noqa E402
from test import results # noqa E402
RESULTS = os.environ.get("GDL_TEST_RESULTS")
if RESULTS:
results = util.import_file(RESULTS)
else:
from test import results
# temporary issues, etc.