Project: pygitweb

053f925 #!/usr/bin/env python3
from __future__ import annotations
bae6568 import os
import shlex
053f925 import subprocess
import sys
bae6568 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)
053f925 def main() -> int:
bae6568 return subprocess.call([sys.executable, "-m", "pytest", ".", *_extra_args(sys.argv[1:])])
053f925
if __name__ == "__main__":
73c9c30 raise SystemExit(main())