From 10987f08f8b6c510ba64f4b42d95ba67eec6e5b0 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 13 Mar 2023 02:07:49 -0400 Subject: New upstream version 1.25.0. --- test/test_config.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test/test_config.py') 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") -- cgit v1.2.3