Coverage for test_plan.py: 88%

14 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2025-08-17 11:24 -0700

1#!/usr/bin/env python3 

2"""Pytest launcher for gentrie tests. 

3 

4Usage: 

5 ./test_plan.py # run all tests under tests/gentrie 

6 

7Environment (optional): 

8 GENTRIE_FAIL_FAST=1 # enable fail-fast (-x) 

9""" 

10 

11from __future__ import annotations 

12 

13import os 

14import sys 

15import pytest 

16 

17 

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") 

27 

28 return args 

29 

30 

31def main() -> int: 

32 args = build_pytest_args() 

33 return pytest.main(args) 

34 

35 

36if __name__ == "__main__": 

37 sys.exit(main())