From 425f5b427283347a81ba2a5902876a15b2debac3 Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 7 Nov 2026 16:39:15 -0700 Subject: [PATCH] fix: run_tests.sh fallback logic for pytest availability --- run_tests.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index d32ffd4..2cbcab6 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -3,11 +3,15 @@ cd "$(dirname "$0")" -# Use full python path if in Hermes environment +# Default to Hermes python (has pytest), fall back to system python if [ -f "/opt/hermes/tools/python-3.14.9+202****1021-linux-x64/bin/python" ]; then PYTHON="/opt/hermes/tools/python-3.14.9+202****1021-linux-x64/bin/python" -else +elif command -v python3 &>/dev/null && python3 -c "import pytest" 2>/dev/null; then PYTHON="python3" +else + echo "Error: pytest not found. Try:" + echo " pip install pytest numpy psutil Pillow" + exit 1 fi echo "Running tests with: $PYTHON"