Spaces:
Sleeping
Sleeping
File size: 468 Bytes
edc06cb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import pytest
from syrupy.assertion import SnapshotAssertion
from syrupy.extensions.json import JSONSnapshotExtension
@pytest.fixture
def snapshot_json(snapshot: SnapshotAssertion) -> SnapshotAssertion:
"""
syrupyでJSONをsnapshotするためのfixture。
Examples
--------
>>> def test_foo(snapshot_json: SnapshotAssertion):
>>> assert snapshot_json == {"key": "value"}
"""
return snapshot.use_extension(JSONSnapshotExtension)
|