Spaces:
Running on Zero
Running on Zero
File size: 809 Bytes
46f1a78 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/usr/bin/env bash
# Full test suite. Exits non-zero if anything fails.
#
# bash tests/run_all.sh # everything except the real-model test
# bash tests/run_all.sh --slow # including the 100-step Chronos smoke test
set -euo pipefail
cd "$(dirname "$0")/.."
PY="${PYTHON:-python}"
[ -x "../.venv/bin/python" ] && PY="../.venv/bin/python"
MARK=(-m "not slow")
if [ "${1:-}" = "--slow" ]; then MARK=(); fi
echo "== Backtest Lab test suite =="
# The ${arr[@]+"${arr[@]}"} form keeps an empty array safe under `set -u`
# on the bash 3.2 that ships with macOS.
"$PY" -m pytest tests/ -q ${MARK[@]+"${MARK[@]}"} -W "error::FutureWarning"
echo
echo "== Known-answer tests (Phase 1 gate) =="
"$PY" -m pytest tests/test_engine.py -q -k "ka1 or ka2 or ka3 or ka4 or ka5 or ka6"
echo
echo "All green."
|