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-7/

Snapshot Hygiene Check

Ensure a small snapshot-tested data module handles stale snapshot artifacts correctly across update, strict, and warn-only runs.

Capabilities

Remove unused artifacts on update

  • When the suite is run in snapshot update mode, an intentionally unused snapshot artifact is deleted while the active release snapshot is refreshed and reported as kept. The run exits successfully and notes the removal. @test

Fail when stale artifacts exist

  • Running the suite normally with the unused snapshot artifact present must fail, leaving snapshot files untouched but listing the unused artifact in the output. @test

Warn-only reporting

  • When warn-only snapshot hygiene is enabled, the suite completes successfully while emitting a warning that names the unused snapshot artifact and indicates it remains on disk. @test

Implementation

@generates

API

from typing import Dict, List

def fetch_active_releases() -> List[Dict[str, str]]:
    """Return the current releases that should be snapshotted."""

def fetch_deprecated_releases() -> List[Dict[str, str]]:
    """Return deprecated releases used only for preparing an intentionally unused snapshot artifact."""

Dependencies { .dependencies }

syrupy { .dependency }

Snapshot testing plugin for pytest that supports update, warn-only, and reporting modes for unused snapshot artifacts.

Install with Tessl CLI

npx tessl i tessl/pypi-syrupy

tile.json