Skip to content

Simplify graph image regression tests - #192

Merged
lusingander merged 7 commits into
masterfrom
graph-tests
Oct 12, 2026
Merged

lusingander merged 7 commits into
masterfrom
graph-tests

Conversation

@lusingander

Copy link
Copy Markdown
Owner

No description provided.

Render each commit row in display order using shared drawing pixels. This avoids dropping commit positions when different rows have identical edge lists.

Add a snapshot of three disconnected roots. The old helper fails this snapshot; all 29 graph tests pass with direct row rendering.
Use build_single_graph_row_image for both image uploads and snapshot rows, so commit lookup and fixed-width selection have a single implementation. Snapshot tests continue to use fixed-width images.
Build the annotated canvas from decoded row widths and heights instead of duplicating cell pixel sizes. All 29 graph tests pass with unchanged existing snapshots.
Use one assertion entry point to render, save and compare each snapshot. Compare the generated image in memory instead of reopening the output PNG, while retaining combined mismatch reports and diff images.

All 29 graph tests pass. Separate negative checks detect both pixel and dimension mismatches and preserve diagnostic output.
Move snapshot options, annotated image assembly, comparison and diagnostic output into a dedicated child module. Test cases and helper bodies are preserved apart from the visibility needed by their caller.
Place GitRepository under a test-only support module and update its two consumers. Git commands and repository setup behavior stay the same; mailmap tests and the disconnected-root graph case pass.
Register graph tests through the normal module hierarchy and place their snapshot helpers beside them. Update contributor instructions with the new test filter and optional repository dump setting; snapshot file locations stay the same.
@lusingander
lusingander merged commit 3e3e16f into master Oct 12, 2026
18 checks passed
@lusingander
lusingander deleted the graph-tests branch October 12, 2026 00:11
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