def _run_fulltest(extra_args=()): command = [from_env_bin("py.test")] if extra_args: command += list(extra_args) else: command += ["tests"] subprocess.check_call(command, cwd=from_project_root())
def _run_tmux_frontend(port): tmuxp = from_env_bin('tmuxp') os.execve( tmuxp, [tmuxp, 'load', from_project_root('_lib', 'frontend_tmux.yml')], dict(os.environ, TESTSERVER_PORT=str(port), CONFIG_DIRECTORY=from_project_root("conf.d")))
def _run_deploy(dest): prepare_source_package() cmd = [from_env_bin("python"), from_env_bin("ansible-playbook"), "-i"] click.echo(click.style( "Running deployment on {0!r}. This may take a while...".format(dest), fg='magenta')) cmd.append(from_project_root("ansible", "inventories", dest)) if dest in ("localhost",): cmd.extend(["-c", "local"]) if dest == "localhost": cmd.append("--sudo") cmd.append(from_project_root("ansible", "site.yml")) if dest == "vagrant": subprocess.check_call('vagrant up', shell=True) os.environ["ANSIBLE_HOST_KEY_CHECKING"] = 'false' subprocess.check_call(cmd)
def _run_fulltest(extra_args=()): subprocess.check_call([from_env_bin("py.test"), "tests"] + list(extra_args), cwd=from_project_root())
def _run_pytest(pytest_args=()): subprocess.check_call( [from_env_bin("py.test")]+list(pytest_args), cwd=from_project_root())
def _run_unittest(): subprocess.check_call( [from_env_bin("py.test"), "tests/test_ut"], cwd=from_project_root())
def _run_unittest(): subprocess.check_call( [from_env_bin("py.test"), "tests/", "--cov=flask_app", "--cov-report=html"], cwd=from_project_root())
def _run_tmux_frontend(port): tmuxp = from_env_bin('tmuxp') os.execve(tmuxp, [tmuxp, 'load', from_project_root('_lib', 'frontend_tmux.yml')], dict(os.environ, TESTSERVER_PORT=str(port), CONFIG_DIRECTORY=from_project_root("conf.d")))
def _run_tmux_frontend(): tmuxp = from_env_bin('tmuxp') os.execv(tmuxp, [tmuxp, 'load', from_project_root('_lib', 'frontend_tmux.yml')])
def _run_slash(slash_args=()): subprocess.check_call([from_env_bin("slash"), "run"] + list(slash_args), cwd=from_project_root())
def _run_slash(slash_args=()): subprocess.check_call( [from_env_bin("slash"), "run"]+list(slash_args), cwd=from_project_root())