Skip to content

test: make streaming FPS expectations explicit - #797

Open
rokkalababu-dotcom wants to merge 3 commits into
Hebbian-Robotics:mainfrom
rokkalababu-dotcom:test/explicit-fps-outcomes
Open

rokkalababu-dotcom wants to merge 3 commits into
Hebbian-Robotics:mainfrom
rokkalababu-dotcom:test/explicit-fps-outcomes

Conversation

@rokkalababu-dotcom

@rokkalababu-dotcom rokkalababu-dotcom commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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 --check passed 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

  • Updated outcome-focused tests.
  • No documentation update needed: no production behavior, formats or requirements changed.
  • Ran the required Ruff formatting/lint and ty checks in the locked environment.
  • Ran the focused and full default pytest suites.
  • No recordings, generated media, credentials, private URLs or runtime artifacts are included.
  • Stored-data compatibility is unchanged.

AI assistance

Codex prepared the test/configuration changes and ran the local checks.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

This PR strengthens frame-rate tests with explicit expected results for both estimators. Production code and stored data are unchanged.

  • Frame-rate tests now check both estimators against fixed outcomes.

No actionable issues found.

Reviews (2) · Last reviewed commit: "Merge branch 'main' into test/explicit-f..." · Reviewed by Greptile

@rokkalababu-dotcom

Copy link
Copy Markdown
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

No deployments
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.

Enable Ruff PT017 and rewrite streaming FPS error assertions

1 participant