Project: pygitweb

#!/usr/bin/env python3
from __future__ import annotations
import os
import shlex
import subprocess
import sys
def _extra_args(argv: list[str]) -> list[str]:
raw = os.environ.get("usage_pytest_args") # noqa: SIM112 — mise usage_* vars
if raw is not None:
return shlex.split(raw) if raw else []
return list(argv)
def main() -> int:
return subprocess.call([sys.executable, "-m", "pytest", ".", *_extra_args(sys.argv[1:])])
if __name__ == "__main__":
raise SystemExit(main())