def test_options_from_venv_config(script, virtualenv):
 from pip.locations import config_basename
 conf = '[global]\nno-index = true'
 ini = (virtualenv.location / config_basename)
 with open(ini, 'w') as f:
  f.write(conf)
 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_venv_config ( script , virtualenv ) : from pip . locations import config_basename conf = '[global]\nno-index = true' ini = ( virtualenv . location / config_basename ) with open ( ini , 'w' ) as f : f . write ( conf ) 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 a virtualenv-local config file .