syrupy

Validate Python test outputs against stored snapshots with pytest integration.

118|10|Updated Oct 13, 2025
One-click install
npx skills add https://github.com/anam-org/metaxy --skill syrupy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: syrupy
Source: https://github.com/anam-org/metaxy/tree/main/.claude/skills/syrupy
Command: npx skills add https://github.com/anam-org/metaxy --skill syrupy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Syrupy enables deterministic snapshot testing for Python tests by validating outputs against stored snapshots, ensuring immutability across runs.

Core Features & Use Cases

  • Snapshot-based testing for complex data structures, API responses, and UI components.
  • Built-in matchers and filters (path_type, path_value, props, paths) for flexible data handling.
  • Extensions and customization (JSON, SingleFile, image extensions) and easy integration with pytest.

Quick Start

Install syrupy, write tests using assert result == snapshot(...), run pytest, and, if needed, update snapshots with --snapshot-update.

Frequently Asked Questions about syrupy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use snapshot testing to validate complex API responses in pytest?

Syrupy enables deterministic snapshot testing for Python tests by validating complex API responses against stored snapshots, ensuring immutability across runs.

What is the best way to update immutable snapshots after an intentional output change?

The best way to update immutable snapshots is by running pytest with the --snapshot-update flag. This regenerates the stored snapshot files to match the newly changed outputs, keeping deterministic verification intact.

Does pytest snapshot testing support filtering specific data structures or paths?

Yes, pytest snapshot testing supports built-in matchers and filters like path_type, path_value, props, and paths. These allow flexible data handling when validating complex data structures across regressions.

Can I extend snapshot testing to handle custom JSON or image file formats?

Yes, snapshot testing supports extensions and customization for JSON, SingleFile, and image formats, enabling flexible diff mode and configuration hooks for pytest integration.

When should I use snapshot testing instead of writing explicit assertions?

Snapshot testing is ideal when validating complex data structures, API responses, or UI components where writing explicit assertions is cumbersome. It ensures deterministic verification across runs without manually maintaining expected values.