mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-03-12 21:23:05 -07:00
21 lines
426 B
Python
21 lines
426 B
Python
#!/usr/bin/env python3
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
def run(cmd, label):
|
|
print(f"\n==> {label}: {' '.join(cmd)}")
|
|
return subprocess.call(cmd)
|
|
|
|
|
|
def main():
|
|
# Lint first so we fail fast on style issues.
|
|
rc = run([sys.executable, "-m", "ruff", "check", "."], "lint")
|
|
if rc != 0:
|
|
return rc
|
|
return run([sys.executable, "-m", "pytest"], "pytest")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|