exoroute-cross-venue-order-.../test.sh

31 lines
823 B
Bash

#!/usr/bin/env bash
set -euo pipefail
echo "===> Running build and lightweight tests for ExoRoute skeleton <==="
# Build the package to verify packaging metadata and directory structure
python -m build
# Ensure tests can import the local package from source without installing editable
if [ -z "${PYTHONPATH+x}" ]; then
export PYTHONPATH="${PWD}"
else
export PYTHONPATH="${PWD}:$PYTHONPATH"
fi
# Run lightweight tests if pytest is available; otherwise skip gracefully
if command -v pytest >/dev/null 2>&1; then
echo "===> Running pytest tests <==="
pytest -q
else
echo "pytest not installed, skipping tests."
fi
# Quick smoke check of import stability
python - <<'PY'
import exoroute
assert hasattr(exoroute, '__all__')
print('Import OK: exoroute package loaded')
PY
echo "===> Tests completed (smoke) <==="