Pytest snapshot testing utility that enables developers to write tests asserting immutability of computed results.
Overall
score
80%
Create small helpers that emit deterministic artifacts in multiple formats (structured data, JSON payloads, raw bytes, PNG bytes, and SVG markup) and verify them with snapshot tests stored through the snapshot tool's built-in extensions.
.json snapshot with stable key ordering that includes two SKU entries with name, stock count, and category fields. @test.png snapshot representing a tiny badge that uses at least two distinct colors and remains byte-identical on reruns. @test.svg snapshot containing width/height attributes, a shape element, and text label content that remains identical on reruns. @test@generates
def build_order_summary() -> dict:
"""Return structured purchase summary data with two line items, totals, taxes, and tag metadata."""
def build_inventory_payload() -> dict:
"""Return JSON-serializable inventory payload for at least two SKUs, including stock counts and categories."""
def build_raw_telemetry() -> bytes:
"""Return deterministic raw bytes payload containing an ASCII header, version byte, body bytes, and checksum."""
def generate_png_badge() -> bytes:
"""Return PNG-encoded bytes for a tiny badge image that contains at least two distinct colors."""
def generate_svg_badge() -> str:
"""Return SVG markup for a small badge that includes dimensions, a shape, and visible text."""Snapshot testing plugin that provides built-in amber, json, raw, png, and svg snapshot extensions.
Install with Tessl CLI
npx tessl i tessl/pypi-syrupyevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10