Testing
Verify that the library functions correctly through smoke checks, pytest sweeps, and validation auditors.
To maintain library integrity, prevent regressions, and verify fractional-order integrations remain consistent, the package implements complementary testing strategies: Smoke Checks, Pytest Sweeps, and Automated Validation Audits.
Smoke Checks
Smoke checks verify core entry points and compilers compile correctly. These commands do not require pytest:
# 1. Compile all library directories
python -m compileall hidden_attractors examples tests tools/cli
# 2. Run quick equilibria check
python examples/quickstart_equilibria.py
# 3. Test help output on CLI tools
python tools/cli/robustness_overlay_c_trajectories.py --help
python tools/cli/lure_top3_sphere_robustness.py --help
python tools/cli/refine_project_basin_classification.py --help
Running Pytest
To run the unit tests, install the package in editable mode with development dependencies:
# Install package with [dev] extras
python -m pip install -e ".[dev]"
# Run unit tests
python -m pytest -q
Scope of Tests
Unit tests verify:
- Equilibria Resection: Ensures equilibria points returned by the model functions are correct roots of the system vector field (residuals ).
- Candidate Loading: Mappings return exactly the expected reference coordinate shapes and records.
- Solver Stages: Confirms EFORK Runge-Kutta limits at match explicit 3rd-order coefficients.
Native Backend Testing
Native C-compiled backend tests are run inside temporary directories and verify:
- OpenMP Policies: Confirms multi-threading schedules coordinate correctly.
- Compiler Compatibility: Ensures
gcc,clang, or MSVC compile C wrappers cleanly.