From cdb89bfc9705bdee18a6893d1bb2678f6b8b7edd Mon Sep 17 00:00:00 2001 From: xegineering Date: Wed, 2 Oct 2024 20:51:53 +0200 Subject: Add basic check.py This script should be usable as a Git pre-commit hook to make sure every commit has a running test suite and is well formatted. This commit starts with running the test suite for the module. --- check.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 check.py (limited to 'check.py') diff --git a/check.py b/check.py new file mode 100755 index 0000000..47819a1 --- /dev/null +++ b/check.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 + + +import subprocess +import pathlib + + +def main() -> None: + subprocess.run( + ["go", "test", "-v"], + check=True, + cwd=pathlib.Path(__file__).parent, + ) + + +if __name__ == "__main__": + main() -- cgit v1.2.3-70-g09d2