Skip to content

v0.8.0

Compare
Choose a tag to compare
@15r10nk 15r10nk released this 09 Apr 10:33
· 230 commits to main since this release

What's Changed

Snapshot parts can now be replaced by dirty-equals expressions. These parts will not be changed if the user uses --inline-snapshot=fix. This should provide more flexibility if snapshots change frequently for unimportant reasons.

from inline_snapshot import snapshot
from dirty_equals import IsDatetime
import datetime

def get_data():
    return {
        "date": datetime.datetime.utcnow(),
        "payload": "some data",
    }

def test_function():
    assert get_data() == snapshot(
        {
            "date": IsDatetime(),
            "payload": "some data",
        }
    )

Documentation

Thank you to @alexmojaki for the Idea.

Full Changelog: v0.7.0...v0.8.0