We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13078b4 commit 154ba71Copy full SHA for 154ba71
src/common/test_tools/plugin.py
@@ -82,10 +82,12 @@ def flagsmith_markers_marked(
82
@pytest.fixture
83
def snapshot(request: pytest.FixtureRequest) -> SnapshotFixture:
84
for_update = request.config.getoption("--snapshot-update")
85
+ snapshot_dir = request.path.parent / "snapshots"
86
+ snapshot_dir.mkdir(exist_ok=True)
87
88
def _get_snapshot(name: str = "") -> Snapshot:
89
snapshot_name = name or f"{request.node.name}.txt"
- snapshot_path = request.path.parent / f"snapshots/{snapshot_name}"
90
+ snapshot_path = snapshot_dir / snapshot_name
91
return Snapshot(snapshot_path, for_update=for_update)
92
93
return _get_snapshot
0 commit comments