Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Expose tenzir-test as a reusable Python library.

Nov 4, 2025 · @mavam, @codex

The test framework now exposes its harness as a reusable Python library, returning structured execution results instead of exiting the process. Callers can import the new execute helper and receive an ExecutionResult with project summaries, exit codes, and failure details for downstream automation.

Example:

from pathlib import Path
from tenzir_test import ExecutionResult, execute
result: ExecutionResult = execute(tests=[Path("tests/pipeline.tql")])
if result.exit_code:
raise SystemExit(result.exit_code)
for project in result.project_results:
print(project.selection.root, project.summary.total)