Skip to content

test: dispatch + kwarg-forwarding guards for the solver read path - #8

Open
cnoellert wants to merge 1 commit into
mainfrom
test/dispatch-regression
Open

cnoellert wants to merge 1 commit into
mainfrom
test/dispatch-regression

Conversation

@cnoellert

Copy link
Copy Markdown
Owner

Summary

Adds the first unit tests to forge-align — lightweight guards for the solver's extension dispatch and container kwarg-forwarding, locking down the regressions introduced by the forge-io v0.5.0/v0.6.0 integration.

What's covered

  • .mxfread_container_frame (forge-io, essence-classified) — the regression, since .mxf used to hit a bespoke ffmpeg fallback that was removed. Also asserts the fallback symbols (extract_container_frame, _FFMPEG_CONTAINER_EXTS) are gone.
  • Full dispatch table: .r3d → raw clip; .mov/.mp4/.m4v/.avi/.mkv → container; everything else → sequence; case-insensitive; path/frame_idx/assume_source threaded through unchanged.
  • read_container_frame forwards frame_index + assume_source + the sRGB working_space default into forge_io.read; missing file raises FileNotFoundError.

Hermetic by design

tests/conftest.py stubs forge_io when it isn't importable, and every function under test is monkeypatched — no real decode, no OIIO/OCIO needed. Verified passing three ways: in the forge env (real forge-io), in base python, and with forge_io actively blocked (proves CI-safety). 16 tests, ~0.01s.

Adds [tool.pytest.ini_options] testpaths=["tests"]. No production code touched.

🤖 Generated with Claude Code

Lightweight, hermetic unit tests (no real forge-io / OIIO needed — conftest
stubs forge_io when absent; functions under test are monkeypatched so no
decode runs). Locks down the regressions from the forge-io v0.5.0/v0.6.0 work:

- .mxf routes to read_container_frame (forge-io, essence-classified), NOT a
  bespoke ffmpeg fallback; the fallback symbols are asserted gone.
- .r3d → raw clip; .mov/.mp4/.m4v/.avi/.mkv → container; sequences otherwise;
  case-insensitive; path/frame/assume_source threaded through unchanged.
- read_container_frame forwards frame_index + assume_source + the sRGB
  working_space default into forge_io.read; missing file raises.

Adds [tool.pytest.ini_options] testpaths=["tests"]. 16 tests, pass in the
forge env and with forge_io blocked (CI-safe).

Co-Authored-By: Claude Opus 4.8 (1M context) <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