Skip to content

fix: 馃悰 Run smoke tests for the simulation's frame count instead of 1000 - #147

Merged
ShisatoYano merged 1 commit into
mainfrom
fix/86-smoke-test-frame-num
Oct 6, 2026
Merged

ShisatoYano merged 1 commit into
mainfrom
fix/86-smoke-test-frame-num

Conversation

@ShisatoYano

Copy link
Copy Markdown
Owner

Summary

In test mode (show_plot = False), GlobalXYVisualizer.draw() always ran 1000 frames. The simulations only need span_sec / interval_sec + 1 frames (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: replace range(1000) with range(self.time_params.get_frame_num())
  • test/test_global_xy_visualizer.py (new): regression test that counts update() calls with a fake object and checks they match get_frame_num() (fails with 1000 == 51 before the fix)

Impact

  • No simulation has more than 1000 frames, so no test becomes longer
  • Smoke tests don't assert on the state after main(), so fewer frames don't change their results
  • simulation_finished() still fires on the last frame, so the final full-range axis limits are still applied

Test

馃 Generated with Claude Code

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>
@ShisatoYano ShisatoYano self-assigned this Oct 5, 2026
@ShisatoYano ShisatoYano added the bug Something isn't working label Oct 5, 2026
@ShisatoYano
ShisatoYano merged commit fd73a23 into main Oct 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smoke tests run 1000 frames regardless of span_sec

1 participant