Coverage for test_plan.py: 88%
14 statements
« prev ^ index » next coverage.py v7.6.10, created at 2025-08-19 19:27 -0700
« prev ^ index » next coverage.py v7.6.10, created at 2025-08-19 19:27 -0700
1#!/usr/bin/env python3
2"""Pytest launcher for gentrie tests.
4Usage:
5 ./test_plan.py # run all tests under tests/gentrie
7Environment (optional):
8 GENTRIE_FAIL_FAST=1 # enable fail-fast (-x)
9"""
11from __future__ import annotations
13import os
14import sys
15import pytest
18def build_pytest_args() -> list[str]:
19 args: list[str] = []
20 # Fail fast
21 if os.environ.get("GENTRIE_FAIL_FAST") == "1": 21 ↛ 22line 21 didn't jump to line 22 because the condition on line 21 was never true
22 args.append("-x")
23 # Quiet by default; adjust as needed
24 args.extend(["-q", "--disable-warnings"])
25 # Add test path
26 args.append("tests/gentrie")
28 return args
31def main() -> int:
32 args = build_pytest_args()
33 return pytest.main(args)
36if __name__ == "__main__":
37 sys.exit(main())