Skip to content

snapshot gate - #721

Merged
grantmcdermott merged 3 commits into
mainfrom
snapshot-gate
Sep 9, 2026
Merged

grantmcdermott merged 3 commits into
mainfrom
snapshot-gate

Conversation

@grantmcdermott

@grantmcdermott grantmcdermott commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

Fix annoying make testall choke.

(Still need to test on a Mac.)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are small, targeted, and align local test execution with existing snapshot gating, with only a minor comment-doc fix suggested.

Pull request overview

This PR adjusts the local test runner and one legend snapshot test to avoid a failure caused by snapshot plotting being gated off (i.e., the warning only occurs when the plot is actually drawn).

Changes:

  • Set NOT_CRAN=true in make testall and make testone so local runs follow the “run snapshots when permitted” path.
  • Add a snapshots_run helper flag mirroring tinysnapshot’s snapshot-plot gating logic.
  • Guard a warning assertion in test-legend.R so it only runs when snapshots are actually executed.
File summaries
File Description
Makefile Exports NOT_CRAN=true for testall/testone to prevent snapshot-gate-related failures in local runs.
inst/tinytest/test-legend.R Skips expect_warning(expect_snapshot_plot(...)) when snapshots aren’t drawn, avoiding a false failure.
inst/tinytest/helpers.R Introduces snapshots_run gate for tests that need to know whether snapshot plotting will occur.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread inst/tinytest/helpers.R Resolved
@grantmcdermott

Copy link
Copy Markdown
Owner Author

Confirmed that it runs fine on Mac too.

@grantmcdermott
grantmcdermott merged commit 9f66e01 into main Sep 9, 2026
3 checks passed
@grantmcdermott
grantmcdermott deleted the snapshot-gate branch September 9, 2026 15:57
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