fix: 馃悰 Run smoke tests for the simulation's frame count instead of 1000 - #147
Merged
Merged
Conversation
In test mode GlobalXYVisualizer.draw() always ran 1000 frames, while the simulations only need span_sec / interval_sec + 1 frames (81-551). Use the same frame count as the animation so smoke tests stop doing 2-12x extra work. Closes #86 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
In test mode (
show_plot = False),GlobalXYVisualizer.draw()always ran 1000 frames. The simulations only needspan_sec / interval_sec + 1frames (81-551 across all 37 simulations), so every smoke test did 2-12x more work than the simulation itself.This PR runs
time_params.get_frame_num()frames, the same number the animation uses.Closes #86
Changes
src/components/visualization/global_xy_visualizer.py: replacerange(1000)withrange(self.time_params.get_frame_num())test/test_global_xy_visualizer.py(new): regression test that countsupdate()calls with a fake object and checks they matchget_frame_num()(fails with1000 == 51before the fix)Impact
main(), so fewer frames don't change their resultssimulation_finished()still fires on the last frame, so the final full-range axis limits are still appliedTest
pytest: 96 passed locally (38m36s on Linux)rrt571s,dijkstra446s, ...). That is tracked separately in Path planning smoke tests write search GIFs and overwrite tracked files聽#87.mainrun (Linux 52m / macOS 58m / Windows 1h49m)馃 Generated with Claude Code