File: test_amber_single_file.py

package info (click to toggle)
python-syrupy 4.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,368 kB
  • sloc: python: 5,978; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 435 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pytest

from syrupy.extensions.single_file import SingleFileAmberSnapshotExtension


@pytest.fixture
def snapshot_single(snapshot):
    return snapshot.use_extension(SingleFileAmberSnapshotExtension)


def test_amber_single_file(snapshot_single):
    assert snapshot_single == 1
    assert snapshot_single == {"a": "b"}
    assert (
        snapshot_single
        == """
        Multi
        line
        string
    """
    )