#!/usr/bin/env bash
# Run the test suite inside a Python container using the wheel from dist/.
# Requires docker-build.sh to have been run first.
# Can be run from any directory.
set -euo pipefail

PROJECT_ROOT="$(cd "$(dirname "$0")/.." && pwd)"

docker run --rm \
  -v "$PROJECT_ROOT":/project \
  -w /project \
  python:3.14.3-trixie \
  bash -c "
    set -euo pipefail
    pip install --quiet --no-index --find-links dist pyfitparsernative
    pip install --quiet -r docker/requirements-test.txt
    pytest
  "
