Skip to content

Commit 36c3886

Browse files
Fix: Implement get_snapshot_file in PytestSnapshotFileLayout
- Add get_snapshot_file implementation that delegates to existing snapshotfile_for_testfile method - Ensures PytestSnapshotFileLayout properly implements the abstract method Co-Authored-By: [email protected] <[email protected]>
1 parent cdd5fed commit 36c3886

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/pytest-selfie/pytest_selfie/plugin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ def snapshotfile_for_testfile(self, testfile: TypedPath) -> TypedPath:
7575
else:
7676
raise ValueError(f"Unknown file extension, expected .py: {testfile.name}")
7777

78+
def get_snapshot_file(self, test_file: TypedPath) -> TypedPath:
79+
return self.snapshotfile_for_testfile(test_file)
80+
7881
def __infer_default_line_ending_is_unix(self) -> bool:
7982
def walk_callback(walk: Iterator[TypedPath]) -> bool:
8083
for file_path in walk:

0 commit comments

Comments
 (0)