Python Tests#
pycunls tests are written with pytest and live in python/tests/.
For the tests of the C++ library, see C++ Tests (C++ Tests).
Prerequisites#
Install the test dependencies:
cd python
pip install ".[test]"
This installs pytest and cupy-cuda13x (used only by
test_cupy_interop.py; warp-lang is a runtime dependency).
Run all tests#
cd python
pytest tests/ -v
Run a specific test module#
pytest tests/test_minimizer.py -v
pytest tests/test_warp_factor.py -v
Test modules#
Module |
Coverage |
|---|---|
|
Interop with arrays from another library (CuPy) and raw pointers in pycunls constructors. |
|
State batch creation, state pointer access, and constant-state marking for all Euclidean and Lie group state types. |
|
Built-in factor batch creation and connectivity for all factor types (priors, between, reprojection, ICP). |
|
End-to-end Gauss-Newton and Levenberg-Marquardt solves on small problems; verifies cost reduction and convergence. |
|
All robust loss function batches (Huber, Cauchy, Arctan, SoftLOne, Tolerant, Tukey, Trivial, Scaled). |
|
Custom |
|
Custom |