| 123456789101112131415161718192021 |
- #!/usr/bin/env bash
- set -euo pipefail
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
- cd "$ROOT_DIR"
- echo "Running tests (pytest)..."
- if [[ -f .venv/bin/activate ]]; then
- # shellcheck disable=SC1091
- source .venv/bin/activate
- fi
- if command -v python >/dev/null 2>&1; then
- exec python -m pytest -q
- elif command -v pytest >/dev/null 2>&1; then
- exec pytest -q
- else
- echo "pytest/python not found in PATH. Install dependencies and retry." >&2
- exit 1
- fi
|