def test_cop_update_defaults_with_store_false():
 class MyConfigOptionParser(virtualenv.ConfigOptionParser, ):
  def __init__(self, *args, **kwargs):
   self.config = virtualenv.ConfigParser.RawConfigParser()
   self.files = []
   optparse.OptionParser.__init__(self, *args, **kwargs)
  def get_environ_vars(self, prefix='VIRTUALENV_'):
   (yield ('no_site_packages', '1'))
 cop = MyConfigOptionParser()
 cop.add_option('--no-site-packages', dest='system_site_packages', action='store_false', help="Don't give access to the global site-packages dir to the virtual environment (default)")
 defaults = {}
 cop.update_defaults(defaults)
 assert (defaults == {'system_site_packages': 0})

def test_cop_update_defaults_with_store_false ( ) : class MyConfigOptionParser ( virtualenv . ConfigOptionParser , ) : def __init__ ( self , * args , ** kwargs ) : self . config = virtualenv . ConfigParser . RawConfigParser ( ) self . files = [ ] optparse . OptionParser . __init__ ( self , * args , ** kwargs ) def get_environ_vars ( self , prefix = 'VIRTUALENV_' ) : ( yield ( 'no_site_packages' , '1' ) ) cop = MyConfigOptionParser ( ) cop . add_option ( '--no-site-packages' , dest = 'system_site_packages' , action = 'store_false' , help = "Don't give access to the global site-packages dir to the virtual environment (default)" ) defaults = { } cop . update_defaults ( defaults ) assert ( defaults == { 'system_site_packages' : 0 } )
store_false options need reverted logic .