Harness
provide.testkit.base.harness
¶
Harness Testing Utilities.
Provides utilities for testing CLI harnesses with artifact management.
Classes¶
HarnessRunner
¶
Test harness runner with artifact management.
Initialize with artifact root directory.
Source code in provide/testkit/base/harness.py
Functions¶
run
¶
run(
command: list[str],
artifact_path: Path | str,
stdin: str | bytes | None = None,
timeout: float = 30.0,
cwd: Path | None = None,
) -> tuple[int, str, str]
Run command and return text output.
For binary output commands, use run_binary() instead.
Source code in provide/testkit/base/harness.py
run_binary
¶
run_binary(
command: list[str],
artifact_path: Path | str,
stdin: str | bytes | None = None,
timeout: float = 30.0,
cwd: Path | None = None,
) -> tuple[int, bytes, bytes]
Run command and return binary output.
Use this for commands that output binary data.