Skip to content

Fix error message for missing snapshot - #23

Merged
bblommers merged 1 commit into
mainfrom
fix-error-message-missing-state
Aug 31, 2026
Merged

Fix error message for missing snapshot#23
bblommers merged 1 commit into
mainfrom
fix-error-message-missing-state

Conversation

@bblommers

Copy link
Copy Markdown
Contributor

When a key is marked as snapshotted, but not actually present in the snapshot.json, the following error is thrown:

No state for tests/mytest.py recorded. Please (re-)generate the snapshot for this test."

This is very confusing though, as there is a state for tests/mytest.py present - it is just missing the state for a specific key.

This PR updates the error message to make it clear that only the key is missing, instead of the entire snapshot.

@alexrashed alexrashed left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Totally makes sense, looks good!

@bblommers
bblommers merged commit 3a34083 into main Aug 31, 2026
3 checks passed
@bblommers
bblommers deleted the fix-error-message-missing-state branch August 31, 2026 07:41
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