From b374d1e8a05818ba7fc77a389c8350bdc9c5f0f9 Mon Sep 17 00:00:00 2001 From: rx <20506548+rx-dev@users.noreply.github.com> Date: Sat, 4 Oct 2025 16:23:19 -0700 Subject: [PATCH 1/2] fix: pytest_plugin for overlays Overlays do not get their named ignored when loading via `pytest_insta` --- lectern/pytest_plugin.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lectern/pytest_plugin.py b/lectern/pytest_plugin.py index f001ed6..628ca01 100644 --- a/lectern/pytest_plugin.py +++ b/lectern/pytest_plugin.py @@ -16,8 +16,15 @@ def load_snapshot(path: Path) -> Document: document = Document(path=path) + ignore_name(document.assets) ignore_name(document.data) + + for overlay in document.assets.overlays: + ignore_name(overlay) + for overlay in document.data.overlays: + ignore_name(overlay) + return document class FmtPackText(Fmt[Document]): From 88911d1efa2243de1db5b56ac0e9849441ba7fe1 Mon Sep 17 00:00:00 2001 From: rx <20506548+rx-dev@users.noreply.github.com> Date: Sat, 4 Oct 2025 16:41:01 -0700 Subject: [PATCH 2/2] fix: actually apply to pack --- lectern/pytest_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lectern/pytest_plugin.py b/lectern/pytest_plugin.py index 628ca01..da193f6 100644 --- a/lectern/pytest_plugin.py +++ b/lectern/pytest_plugin.py @@ -20,9 +20,9 @@ def load_snapshot(path: Path) -> Document: ignore_name(document.assets) ignore_name(document.data) - for overlay in document.assets.overlays: + for overlay in document.assets.overlays.values(): ignore_name(overlay) - for overlay in document.data.overlays: + for overlay in document.data.overlays.values(): ignore_name(overlay) return document