aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_config.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-06-22 21:19:42 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-06-22 21:19:42 -0400
commit408cf4d7719de63b8175bd9b69a7484bc6dba1f8 (patch)
treeeb6ec27c12186e38a97673ec9a1332853aa44175 /test/test_config.py
parent265fafbf1b3d468d4087a5229ca4bad0a651db23 (diff)
parent80e39a8fc7de105510cbbdca8507f2a4b8c9e01d (diff)
Update upstream source from tag 'upstream/1.27.1'
Update to upstream version '1.27.1' with Debian dir 786b4d48b451c0be3e4e14b3739202bb3965566e
Diffstat (limited to 'test/test_config.py')
-rw-r--r--test/test_config.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_config.py b/test/test_config.py
index 06780be..bbe288f 100644
--- a/test/test_config.py
+++ b/test/test_config.py
@@ -165,12 +165,12 @@ class TestConfig(unittest.TestCase):
def test_load(self):
with tempfile.TemporaryDirectory() as base:
path1 = os.path.join(base, "cfg1")
- with open(path1, "w") as file:
- file.write('{"a": 1, "b": {"a": 2, "c": "text"}}')
+ with open(path1, "w") as fp:
+ fp.write('{"a": 1, "b": {"a": 2, "c": "text"}}')
path2 = os.path.join(base, "cfg2")
- with open(path2, "w") as file:
- file.write('{"a": 7, "b": {"a": 8, "e": "foo"}}')
+ with open(path2, "w") as fp:
+ fp.write('{"a": 7, "b": {"a": 8, "e": "foo"}}')
config.clear()
config.load((path1,))
@@ -208,8 +208,8 @@ class TestConfigFiles(unittest.TestCase):
def _load(name):
path = os.path.join(ROOTDIR, "docs", name)
try:
- with open(path) as file:
- return util.json_loads(file.read())
+ with open(path) as fp:
+ return util.json_loads(fp.read())
except FileNotFoundError:
raise unittest.SkipTest(path + " not available")