CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-syrupy

Pytest snapshot testing utility that enables developers to write tests asserting immutability of computed results.

Overall
score

80%

Overview
Eval results
Files

task.mdevals/scenario-8/

Snapshot Output Controls

Create a small snapshot-testing helper that exercises IDE-focused diff exports and output presentation toggles for regression checks on profile payloads.

Capabilities

IDE patch export

  • When a comparison fails with IDE patch export enabled, a patch file for the active test run is emitted containing the diff between actual and stored snapshot data. @test
  • When IDE patch export is disabled, failing comparisons do not leave any patch artifacts behind. @test

Colorized vs plain diffs

  • Disabling colorized output yields a failure message with no ANSI escape sequences in the diff lines. @test
  • Enabling colorized output yields a failure message that includes ANSI coloring for additions and removals in the diff. @test

Implementation

@generates

API

def assert_profile_snapshot(recorder, profile: dict, *, enable_patch: bool = False, color_output: bool = True) -> None:
    """
    Uses the snapshot testing package to compare a profile payload while honoring IDE patch export,
    and color toggles for diff rendering.
    """

Dependencies { .dependencies }

syrupy { .dependency }

Pytest snapshotting plugin used to control diff output and IDE integration.

Install with Tessl CLI

npx tessl i tessl/pypi-syrupy

tile.json