Skip to content

Pytest

run(context, path='.', params='')

Run pytest in path with params.

Source code in saritasa_invocations/pytest.py
 6
 7
 8
 9
10
11
12
13
14
15
16
@invoke.task
def run(
    context: invoke.Context,
    path: str = ".",
    params: str = "",
) -> None:
    """Run pytest in `path` with `params`."""
    docker.up(context)
    printing.print_success("Running PyTest")
    pytest_entry = _config.Config.from_context(context).python.pytest_entry
    python.run(context, f"{pytest_entry} {path} {params}")