Repository navigation
test: run every example script headless as a smoke test - #207
Merged
Merged
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 1 critical |
🟢 Metrics 8 complexity · 0 duplication
Metric Results Complexity 8 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Runs each examples/*.py in a subprocess with MPLBACKEND=Agg and DeprecationWarning turned into an error. Scripts that need a display, a camera, ROS, a GPU model or a large download are skipped with a stated reason, and monalisa.py is skipped when the network is unavailable. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
petercorke
force-pushed
the
test/examples-run-smoke
branch
from
November 22, 2026 00:59
8cf2129 to
ff0b10e
Compare
morphdemo --frames N stops after N updates of the output image, so the smoke test runs five frames instead of every pixel and no longer needs a longer timeout on slow CI runners. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 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
Adds
tests/test_examples_run.py, which runs every script inexamples/in its own process as a smoke test. It setsMPLBACKEND=Aggso plots do not block, and turnsDeprecationWarninginto an error, so an example that uses a removed or deprecated Toolbox API fails in CI rather than in front of a reader. This is how the brokenmorphdemo.py(PR 195, merged) andmonalisa.py(PR 197, merged) were found.bunny.py,showzip.pyandrandomdots.pyneed a window;ros_stream.pyneeds a rosbridge server;torch-yolo.pyandtorch_seg.pyneed torch models downloaded.monalisa.pyfetches from the internet, so a network failure skips it rather than failing.Testing
Locally, on OpenCV 5.0 and Python 3.12: 8 passed, 6 skipped, about 35 seconds. Not run: OpenCV 4, Windows. The CI matrix will do that on this PR, and I have not checked the extra CI time against the matrix.
This change was written with AI assistance (Claude Code) and the diff has been read by the maintainer.
🤖 Generated with Claude Code