v0.8.0
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",
}
)
Thank you to @alexmojaki for the Idea.
Full Changelog: v0.7.0...v0.8.0