smroid / cedar-solve

A fast lost-in-space plate solver for star trackers.
https://tetra3.readthedocs.io/en/latest/
Apache License 2.0
5 stars 0 forks source link

feat: automated tests #9

Closed leocov-dev closed 5 months ago

leocov-dev commented 5 months ago

Added automated tests via pytest framework.

execute:

pytest

some tests are slow due to computation time and they are marked with the slow pytest marker. they can be skipped locally like:

pytest -m "not slow"

Individual test files or methods can be run if needed like:

# run a single file
pytest tests/test_fov_util.py

# run a single test from a file
pytest tests/test_fov_util.py::test_fov_util_separation_for_density

updated Tetra3 to support testing by making the star-catalog path configurable.

some code from examples was migrated to test code