Skip to content

test: add smoke test that runs every figure script under figures/code - #62

Open
petercorke wants to merge 1 commit into
mainfrom
test/figure-scripts-smoke
Open

petercorke wants to merge 1 commit into
mainfrom
test/figure-scripts-smoke

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Adds tests/test_figures.py, a slow test (pytest --runall) that runs every fig*.py and box_*.py under figures/code/ headless, each in its own subprocess with a throwaway working directory so no PDFs land in the repo.

  • 299 scripts found: 123 pass and 176 fail today. The 176 are listed in tests/figures_skiplist.yaml so the test passes now and catches new breakage. Causes seen: matplotlib API drift, missing optional packages such as pyvista, and old scripts using helpers that no longer exist. Fixes will follow in separate PRs, removing entries from the skiplist as they go.
  • tests/run_example.py now sets sys.argv[0] to the script path, because rvcprint names its output from it.

Tested with RTB 1.5.0 and MVTB origin/main (b967cb3d) in a throwaway venv: 123 passed, 176 skipped, 0 failed. Figure scripts are documentation, so this is a smoke test only. It checks that each script runs, not that the figure looks right.

AI-assisted: written with Claude Code.

🤖 Generated with Claude Code

Slow test (--runall). Runs each fig*.py and box_*.py headless in a
subprocess. 176 scripts that fail today are listed in
figures_skiplist.yaml. run_example.py now sets sys.argv[0] so rvcprint
can name its output.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant