Testing¶
The test-suite mirrors SDPB’s own (c-src/sdpb/test/) stage by stage and
reuses its reference data, so a Python result is checked against the same
numbers the C++ binaries are checked against, with the same tolerances.
pytest # about a minute; skips extension tests if it is not built
pytest --run-slow # adds the SingletScalar datasets, about 17 minutes
Tests |
Mirrors |
What is checked |
|---|---|---|
|
|
number round trips through C++; |
|
|
sample points, scalings and bases against the fork’s Mathematica values (16 bits); crash tests over poles and degrees |
|
|
|
|
|
solve each dataset with the fork’s own solver arguments; compare |
|
(analytic) |
closed-form LMI optima; LMI equals a constant PMP |
|
|
checkpoint restart and corruption, run continuation, warm start |
|
(process level) |
precision lock, Ctrl-C, |
Comparisons use SDPB’s rule \(|a - b| < 2^{-p}(|a| + |b|)\) from
tests/util/diff.py. The pytest process runs at 768 bits; checks that must
reproduce a reference made at another precision run in a subprocess
(tests/util/subproc.py).
The fork’s own suite is run with c-src/sdpb/test/run_all_tests.sh (unit
tests under 6 MPI ranks plus integration tests, about 8 minutes); it includes
unit tests for the patches the binding relies on.