Skip to content

Keep snapshot hints anchored to the test directory - #2374

Open
M-Colley wants to merge 1 commit into
r-lib:mainfrom
M-Colley:fix/snapshot-hint-directory-2335
Open

M-Colley wants to merge 1 commit into
r-lib:mainfrom
M-Colley:fix/snapshot-hint-directory-2335

Conversation

@M-Colley

Copy link
Copy Markdown

Fixes #2335.

Capture the test directory when the runner enters it. Snapshot hints then use that directory even when code inside the test changes its working directory. The usual package layout still uses the default path, and hints for test directories under the caller keep a relative path.

The regression exercises both hints from a real snapshot mismatch after changing directories. I ran the suggested accept commands from the caller for default, relative, current, and external test directories. I also verified text and file snapshot hints in parallel workers. The full package check and Air formatting passed on Windows R 4.6.1.

AI assistance was used to prepare and review this patch.

This branch has not been deployed

No deployments
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.

snapshot_accept() / snapshot_review() hint includes wrong path when a test changes the working directory

1 participant