feat: add pytest pre-commit hook and tests scaffold (issue #162)

- pyproject.toml with pytest>=8 in [dependency-groups.dev] so
  uv run --group dev pytest resolves without a global install
- tests/__init__.py and tests/conftest.py skeleton referencing issue #162
- pre-commit local hook runs pytest tests/ on Python file changes;
  exit code 5 (no tests collected) is treated as success so commits
  are not blocked while the test suite is being built out
This commit is contained in:
2026-05-17 11:35:03 +10:00
parent be23a37c2e
commit 451254447f
4 changed files with 20 additions and 0 deletions
+9
View File
@@ -31,6 +31,15 @@ repos:
"-s",
]
- repo: local
hooks:
- id: pytest
name: Run unit tests
entry: bash -c 'uv run --group dev pytest tests/ -q; rc=$?; [ $rc -eq 5 ] && exit 0 || exit $rc'
language: system
types: [python]
pass_filenames: false
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.2
hooks: