diff options
| author | 2023-03-13 02:07:49 -0400 | |
|---|---|---|
| committer | 2023-03-13 02:07:49 -0400 | |
| commit | 10987f08f8b6c510ba64f4b42d95ba67eec6e5b0 (patch) | |
| tree | 1af82cad9ac859a70cafc976a980280b939cfcc7 /test/test_config.py | |
| parent | 919f8ba16a7b82ba1099bd25b2c61c7881a05aa2 (diff) | |
New upstream version 1.25.0.upstream/1.25.0
Diffstat (limited to 'test/test_config.py')
| -rw-r--r-- | test/test_config.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/test_config.py b/test/test_config.py index 7cbb12b..859faf5 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2015-2020 Mike Fährmann +# Copyright 2015-2023 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -11,12 +11,11 @@ import os import sys import unittest -import json import tempfile 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, util # noqa E402 class TestConfig(unittest.TestCase): @@ -209,8 +208,8 @@ class TestConfigFiles(unittest.TestCase): def _load(name): path = os.path.join(ROOTDIR, "docs", name) try: - with open(path) as fp: - return json.load(fp) + with open(path) as file: + return util.json_loads(file.read()) except FileNotFoundError: raise unittest.SkipTest(path + " not available") |
