|  | @@ -62,13 +62,23 @@ def test_initialize_with_relocated_repo_access_should_override_default():
 | 
	
		
			
				|  |  |          os.environ = orig_environ
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -def test_initialize_is_not_affected_by_existing_environment():
 | 
	
		
			
				|  |  | +def test_initialize_prefers_configuration_option_over_borg_environment_variable():
 | 
	
		
			
				|  |  |      orig_environ = os.environ
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      try:
 | 
	
		
			
				|  |  | -        os.environ = {'BORG_PASSPHRASE': 'pass', 'BORG_SSH': 'mosh'}
 | 
	
		
			
				|  |  | +        os.environ = {'BORG_SSH': 'mosh'}
 | 
	
		
			
				|  |  |          module.initialize({'ssh_command': 'ssh -C'})
 | 
	
		
			
				|  |  | -        assert 'BORG_PASSPHRASE' not in os.environ
 | 
	
		
			
				|  |  |          assert os.environ.get('BORG_RSH') == 'ssh -C'
 | 
	
		
			
				|  |  |      finally:
 | 
	
		
			
				|  |  |          os.environ = orig_environ
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +def test_initialize_passes_through_existing_borg_environment_variable():
 | 
	
		
			
				|  |  | +    orig_environ = os.environ
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    try:
 | 
	
		
			
				|  |  | +        os.environ = {'BORG_PASSPHRASE': 'pass'}
 | 
	
		
			
				|  |  | +        module.initialize({'ssh_command': 'ssh -C'})
 | 
	
		
			
				|  |  | +        assert os.environ.get('BORG_PASSPHRASE') == 'pass'
 | 
	
		
			
				|  |  | +    finally:
 | 
	
		
			
				|  |  | +        os.environ = orig_environ
 |