File size: 1,218 Bytes
916755e 5ae003d 916755e | 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 27 28 29 30 31 32 33 34 | # Testing
The suite is layered by dependency and purpose:
```bash
# Fast shared-package tests
uv run pytest tests/unit
# Full CPU suite, including integration and parity tests
uv run pytest
# Required ROOT-GNN parity gate (must fail if DGL is unavailable)
GNN4COLLIDERS_REQUIRE_ROOT_GNN=1 uv run pytest
# Optional layers
uv run pytest -m distributed -v
uv run pytest -m onnx -v
uv run pytest -m gpu -v
GNN4COLLIDERS_ROOT_FIXTURE=/path/to/reduced.root uv run pytest -m real_data -v
```
On Apple Silicon macOS, `uv sync --dev --extra root-gnn` supports CPU
ROOT-GNN unit and integration testing. CUDA and the required ROOT-GNN parity
gate are validated on Linux x86_64 with the `root-gnn` extra installed.
Unit tests use deterministic, small tensors and generated ROOT files. DGL,
ONNX, CUDA, distributed execution, and reduced real-data fixtures remain
optional layers. Tests should assert public contracts and scientific
invariants rather than private call sequences. New regression tests should
use `tmp_path`, explicit seeds, and justified numerical tolerances.
Release validation additionally builds a wheel and runs the CLI help command
in a clean environment; it is not part of the ordinary pytest suite.
|