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 <felix.moessbauer@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
4015a6b384
commit
bb2148016b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user