Skip to content

Add structural assertions for plot tests#46

Closed
chenzc24 wants to merge 2 commits into
Arcadia-1:mainfrom
chenzc24:codex/fix-36-plot-assertions
Closed

Add structural assertions for plot tests#46
chenzc24 wants to merge 2 commits into
Arcadia-1:mainfrom
chenzc24:codex/fix-36-plot-assertions

Conversation

@chenzc24

Copy link
Copy Markdown
Contributor

Depends on #45.

Part of the remaining follow-up work for #36.

Summary:

  • Add structural assertions to plot_spectrum tests so they verify rendered axes, lines, labels, markers, and annotations instead of only checking that PNG files exist.
  • Strengthen sweep_performance_vs_osr plot tests by checking the main performance axis, legend, ENOB twinx axis, and auto-created slope subplot.
  • Strengthen plot_residual_scatter tests by checking scatter collections, point counts, axis labels, pair mapping, and hidden unused subplots.

Notes:

  • This is intentionally limited to common plot APIs and does not address the broader AOUT diagnostic plot files or slow-test audit yet.
  • No product code changes.

Tests:

  • uv run --with pytest pytest tests/unit/spectrum/test_plot_spectrum.py tests/unit/spectrum/test_sweep_performance_vs_osr.py tests/unit/dout/test_plot_residual_scatter.py -q
  • uv run --with pytest pytest tests/unit/spectrum tests/unit/dout/test_plot_residual_scatter.py -q

@Arcadia-1

Copy link
Copy Markdown
Owner

Closing as superseded by #48, which was squash-merged into main and includes this stack layer's plot assertion changes.

@Arcadia-1 Arcadia-1 closed this Jun 22, 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.

2 participants