From bb2148016bda21ef5a816d5d896ecf1f42ba1c90 Mon Sep 17 00:00:00 2001 From: Felix Moessbauer Date: Thu, 4 May 2023 04:32:43 +0200 Subject: [PATCH] do not shadow variables in command tests As part of the tests of the dump plugins a variable was shadowed. By that, one branch of the test was not executed. Signed-off-by: Felix Moessbauer Signed-off-by: Jan Kiszka --- tests/test_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_commands.py b/tests/test_commands.py index 57edf54..eca7fa6 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -98,8 +98,8 @@ def test_dump(changedir, tmpdir, capsys): if r == '--resolve-env': del os.environ['TESTVAR_FOO'] - with open(outfile, 'w') as f: - f.write(capsys.readouterr().out) + with open(outfile, 'w') as file: + file.write(capsys.readouterr().out) with open(outfile, 'r') as cf: flatconf = json.load(cf) if f == 'json' else yaml.safe_load(cf)