Repository navigation
test: make streaming FPS expectations explicit - #797
Open
rokkalababu-dotcom wants to merge 3 commits into
Open
rokkalababu-dotcom wants to merge 3 commits into
rokkalababu-dotcom wants to merge 3 commits into
Conversation
Contributor
[Low impact] This PR appears safe to merge.
|
Contributor
Author
|
I'm wrapping up an academic project submission today and would really appreciate having this merged upstream if everything looks solid. I am actively monitoring this PR and can address any requested tweaks or feedback immediately. Thank you so much for your time and review! |
This branch has not been deployed
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
Closes #792.
Enable Ruff PT017 and replace the reference-derived streaming FPS expectations with explicit outcomes for both estimators.
Why
The previous test used the batch estimator to decide whether the streaming estimator should return a value or raise. Both implementations could therefore agree on an incorrect result. The valid cases now specify the expected FPS, and the invalid cases independently check ValueError messages containing the camera topic and the cause.
Preserves empty, single-timestamp, repeated, decreasing, and even-median cases. Adds an odd-interval-count case and keeps the streaming input as an iterator. Production code and stored data are unchanged.
Validation
Tested locally on macOS with the locked development environment:
.venv/bin/ruff check --fix— passed..venv/bin/ruff format— completed; subsequent--checkpassed for all 322 files..venv/bin/ruff check --select PT017— passed across the repository..venv/bin/ty check— passed.PATH="$PWD/.venv/bin:/tmp/darwin_arm64:$PATH" .venv/bin/python -m pytest -q tests/test_video_streaming.py— 22 passed.PATH="$PWD/.venv/bin:/tmp/darwin_arm64:$PATH" HFLOW_FFMPEG=/tmp/darwin_arm64/ffmpeg .venv/bin/python -m pytest -q— 2600 passed, 47 skipped.git diff --check— passed.No workspace-example files needed changes. The full Python-version matrix and opt-in integration suites were not run locally.
Checklist
AI assistance
Codex prepared the test/configuration changes and ran the local checks.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.