Project: pygitweb

04f3c66 #!/usr/bin/env python3
"""Run pytest --impacted for the pygitweb and pygittools packages."""
from __future__ import annotations
import subprocess
import sys
_MODULES: tuple[str, ...] = (
"pygitweb/src/pygitweb",
"pygittools/src/pygittools",
)
def main() -> int:
extra = sys.argv[1:]
for module in _MODULES:
code = subprocess.call([
sys.executable,
"-m",
"pytest",
".",
"--impacted",
f"--impacted-module={module}",
*extra,
])
if code != 0:
return code
return 0
if __name__ == "__main__":
raise SystemExit(main())