def test_options_from_env_vars(script):
 script.environ['PIP_NO_INDEX'] = '1'
 result = script.pip('install', '-vvv', 'INITools', expect_error=True)
 assert ('Ignoring indexes:' in result.stdout), str(result)
 assert ('DistributionNotFound: No matching distribution found for INITools' in result.stdout)

def test_options_from_env_vars ( script ) : script . environ [ 'PIP_NO_INDEX' ] = '1' result = script . pip ( 'install' , '-vvv' , 'INITools' , expect_error = True ) assert ( 'Ignoring indexes:' in result . stdout ) , str ( result ) assert ( 'DistributionNotFound: No matching distribution found for INITools' in result . stdout )
test if configoptionparser reads env vars .