@contextmanager
def virtualenv():
 with cd(env.venv_path):
  with prefix((u'source %s/bin/activate' % env.venv_path)):
   (yield)

@ contextmanager def virtualenv ( ) : with cd ( env . venv_path ) : with prefix ( ( u'source %s/bin/activate' % env . venv_path ) ) : ( yield )
return a virtual environment which is unique to each test function invocation created inside of a sub directory of the test functions temporary directory .