Skip to content

test: cover flow2rgb validation guards and Flow2Rgb max_norm caching#198

Draft
wkentaro wants to merge 1 commit into
mainfrom
test/flow-coverage
Draft

test: cover flow2rgb validation guards and Flow2Rgb max_norm caching#198
wkentaro wants to merge 1 commit into
mainfrom
test/flow-coverage

Conversation

@wkentaro

Copy link
Copy Markdown
Owner

flow2rgb and Flow2Rgb only had happy-path coverage; the three input-validation
guards and the class's max_norm caching were untested.

Summary

  • Cover the ndim, channel-count, and dtype ValueError guards in flow2rgb.
  • Cover the return_max=True branch (reports the computed max norm, output stays
    consistent when that norm is reused).
  • Cover Flow2Rgb caching the first frame's max_norm and not recomputing it on
    later frames, plus an explicitly-constructed max_norm being preserved.

Test plan

  • uv run pytest tests/unit/_flow_test.py (9 passed)
  • full suite uv run --extra all pytest -n=auto tests (257 passed)
  • uv run ruff check, ruff format --check, ty check on the changed file

@wkentaro wkentaro self-assigned this Jun 10, 2026
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