Skip to content

Commit

Permalink
do not shadow variables in command tests
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
fmoessbauer authored and jan-kiszka committed May 4, 2023
1 parent 4015a6b commit bb21480
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bb21480

Please sign in to comment.