def run_package(package, tox_env):
 curr_dir = os.getcwd()
 package_dir = os.path.join(PROJECT_ROOT, package)
 try:
  os.chdir(package_dir)
  return_code = subprocess.call(['tox', '-e', tox_env])
  return (return_code == 0)
 finally:
  os.chdir(curr_dir)

def run_package ( package , tox_env ) : curr_dir = os . getcwd ( ) package_dir = os . path . join ( PROJECT_ROOT , package ) try : os . chdir ( package_dir ) return_code = subprocess . call ( [ 'tox' , '-e' , tox_env ] ) return ( return_code == 0 ) finally : os . chdir ( curr_dir )
run tox environment for a given package .