|
|
@ -14,7 +14,8 @@ import unittest
|
|
|
|
import json
|
|
|
|
import json
|
|
|
|
import tempfile
|
|
|
|
import tempfile
|
|
|
|
|
|
|
|
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
ROOTDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
|
sys.path.insert(0, ROOTDIR)
|
|
|
|
from gallery_dl import config # noqa E402
|
|
|
|
from gallery_dl import config # noqa E402
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -156,10 +157,12 @@ class TestConfigFiles(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
@staticmethod
|
|
|
|
def _load(name):
|
|
|
|
def _load(name):
|
|
|
|
rootdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
path = os.path.join(ROOTDIR, "docs", name)
|
|
|
|
path = os.path.join(rootdir, "docs", name)
|
|
|
|
try:
|
|
|
|
with open(path) as fp:
|
|
|
|
with open(path) as fp:
|
|
|
|
return json.load(fp)
|
|
|
|
return json.load(fp)
|
|
|
|
|
|
|
|
except FileNotFoundError:
|
|
|
|
|
|
|
|
raise unittest.SkipTest(path + " not available")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
if __name__ == '__main__':
|
|
|
|