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:
		
				
					committed by
					
						
						Jan Kiszka
					
				
			
			
				
	
			
			
			
						parent
						
							4015a6b384
						
					
				
				
					commit
					bb2148016b
				
			@@ -98,8 +98,8 @@ def test_dump(changedir, tmpdir, capsys):
 | 
				
			|||||||
        if r == '--resolve-env':
 | 
					        if r == '--resolve-env':
 | 
				
			||||||
            del os.environ['TESTVAR_FOO']
 | 
					            del os.environ['TESTVAR_FOO']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        with open(outfile, 'w') as f:
 | 
					        with open(outfile, 'w') as file:
 | 
				
			||||||
            f.write(capsys.readouterr().out)
 | 
					            file.write(capsys.readouterr().out)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        with open(outfile, 'r') as cf:
 | 
					        with open(outfile, 'r') as cf:
 | 
				
			||||||
            flatconf = json.load(cf) if f == 'json' else yaml.safe_load(cf)
 | 
					            flatconf = json.load(cf) if f == 'json' else yaml.safe_load(cf)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user