test.sh 439 B

1234567891011121314
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. if [[ -n "${GARDEN_LAYER_VENV:-}" ]]; then
  4. if [[ -f "$GARDEN_LAYER_VENV/bin/activate" ]]; then
  5. # shellcheck disable=SC1091
  6. source "$GARDEN_LAYER_VENV/bin/activate"
  7. else
  8. echo "Warning: GARDEN_LAYER_VENV is set to '$GARDEN_LAYER_VENV' but the activate script is missing." >&2
  9. fi
  10. fi
  11. export PYTHONPATH="$PWD/src${PYTHONPATH:+:$PYTHONPATH}"
  12. python3 -m pytest -v -s test_garden_layer.py