def ensure_engine(f):
 def wrapper(self, *args, **kwargs):
  for env_var_value in (u'false', u'true'):
   with environment_as(HERMETIC_ENV=u'PANTS_ENABLE_V2_ENGINE', PANTS_ENABLE_V2_ENGINE=env_var_value):
    f(self, *args, **kwargs)
 return wrapper

def ensure_engine ( f ) : def wrapper ( self , * args , ** kwargs ) : for env_var_value in ( u'false' , u'true' ) : with environment_as ( HERMETIC_ENV = u'PANTS_ENABLE_V2_ENGINE' , PANTS_ENABLE_V2_ENGINE = env_var_value ) : f ( self , * args , ** kwargs ) return wrapper
a decorator for running an integration test with and without the v2 engine enabled via temporary environment variables .