Add comprehensive tests for MarkersUpdater and PersistentMarkersUpdater classes #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds comprehensive test coverage for the
MarkersUpdaterandPersistentMarkersUpdaterclasses inpyorerun/model_components/model_markers.py, addressing issue #[number].Changes Made
Created
tests/test_model_markers.pywith 20 test cases covering:MarkersUpdater Class (8 tests)
nb_markers,nb_components)to_rerun(),to_component(),to_chunk())PersistentMarkersUpdater Class (9 tests)
nb_markers,nb_frames,marker_names)Utility Functions (3 tests)
compute_markers()function for both single and multiple marker scenariosfrom_pyo_to_rerun()array format conversion validationTechnical Implementation
The tests handle several challenges specific to this codebase:
Dependency Management: Created an isolated test environment to avoid import issues with optional dependencies (
biorbd,opensim) that aren't available in CI environments.Array Format Validation: Properly tests the expected numpy array transformations, particularly the
(nb_markers, 3) → (3, nb_markers)transpose pattern used by thecompute_markers()function.Rerun Integration: Mocks
rerun.log()calls while still validating that properrr.Points3Dcomponents are created with correct properties.Example Test Coverage
All tests follow the existing repository patterns and pytest conventions, ensuring consistency with the current test suite.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com/usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Fixes #78
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
This change is