Skip to content

fix: 🐛 Skip the search GIF in path planning smoke tests - #152

Merged
ShisatoYano merged 1 commit into
mainfrom
fix/87-skip-search-gif-in-tests
Oct 25, 2026
Merged

ShisatoYano merged 1 commit into
mainfrom
fix/87-skip-search-gif-in-tests

Conversation

@ShisatoYano

Copy link
Copy Markdown
Owner

Summary

7 path planning simulations always passed gif_name=search_gif_path to the planner, so every smoke test encoded multi-MB search GIFs and overwrote the committed demo GIFs.

This PR passes the GIF name only when show_plot is true, following aco / elastic_bands.

Closes #87

Changes

  • 7 simulations (astar, astar_bidirectional, dijkstra, rrt, rrt_star, rrt_star_bidirectional, informed_rrt_star): gif_name=search_gif_path if show_plot else None
  • 7 planners: visualize_search() returns early when gif_name is None, like AntColonyPathPlanner. Changing only the simulations was not enough:
    • 6 planners called plt.show() when gif_name was None, which opens a window and blocks the test when a display is available
    • InformedRrtStarPathPlanner called Path(None) and raised TypeError
    • The now unreachable else: plt.show() branch is removed. No caller passes gif_name=None today (each planner's __main__ passes a GIF path)

Test

  • The 7 path planning tests: 7 passed in 31s locally (the same tests took about 1650s in the previous full run, e.g. rrt 571s, dijkstra 446s)
  • No GIF under src/simulations/path_planning/ is written by the tests anymore
  • Saving still works when a GIF name is passed (checked AStarPathPlanner and InformedRrtStarPathPlanner)

Not in this PR

path.json of the RRT planners still changes after the tests because they use unseeded random numbers. Fixing the seed is the scope of #90, so git status becomes fully clean after #90.

🤖 Generated with Claude Code

7 path planning simulations always passed gif_name to the planner, so every
test run encoded multi-MB search GIFs and overwrote the committed demo GIFs.
Pass gif_name only when show_plot is true, like aco/elastic_bands, and make
the planners return early when gif_name is None. Before this, None made 6
planners call plt.show() and made informed RRT* fail with Path(None).

path.json still changes after tests because RRT planners are unseeded; that
is handled in #90.

Closes #87

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ShisatoYano
ShisatoYano merged commit 4fa30ff into main Oct 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Path planning smoke tests write search GIFs and overwrite tracked files

1 participant