[packages/python3-pytest-textual-snapshot] - new

qboosh qboosh at pld-linux.org
Fri Jan 16 21:42:58 CET 2026


commit 01eafb6c130b4bf8ec6bf42625d9350ad49e51ad
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jan 16 21:42:43 2026 +0100

    - new

 pytest_textual_snapshot-syrupy5.patch | 43 ++++++++++++++++++++++++++
 python3-pytest-textual-snapshot.spec  | 58 +++++++++++++++++++++++++++++++++++
 2 files changed, 101 insertions(+)
---
diff --git a/python3-pytest-textual-snapshot.spec b/python3-pytest-textual-snapshot.spec
new file mode 100644
index 0000000..7a715cd
--- /dev/null
+++ b/python3-pytest-textual-snapshot.spec
@@ -0,0 +1,58 @@
+Summary:	Snapshot testing for Textual apps
+Summary(pl.UTF-8):	Testowanie migawkowe aplikacji Textual
+Name:		python3-pytest-textual-snapshot
+Version:	1.1.0
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/pytest-textual-snapshot/
+Source0:	https://files.pythonhosted.org/packages/source/p/pytest-textual-snapshot/pytest_textual_snapshot-%{version}.tar.gz
+# Source0-md5:	0633dc96f70ee1c7bc06597cb323204b
+# https://github.com/Textualize/pytest-textual-snapshot/pull/24
+Patch0:		pytest_textual_snapshot-syrupy5.patch
+URL:		https://pypi.org/project/pytest-textual-snapshot/
+BuildRequires:	python3-build
+BuildRequires:	python3-installer
+BuildRequires:	python3-modules >= 1:3.8.1
+BuildRequires:	python3-poetry-core >= 1.0.0
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 2.044
+BuildRequires:	sed >= 4.0
+Requires:	python3-modules >= 1:3.8.1
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A pytest plugin for snapshot testing Textual applications.
+
+%description -l pl.UTF-8
+Wtyczka pytesta do testowania migawkowego aplikacji Textual.
+
+%prep
+%setup -q -n pytest_textual_snapshot-%{version}
+%patch -P0 -p1
+
+# too common dir name
+%{__sed} -i -e 's,"resources","pytest_textual_snapshot_resources",' pytest_textual_snapshot.py
+
+%build
+%py3_build_pyproject
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+# required, but not installed
+cp -pr resources $RPM_BUILD_ROOT%{py3_sitescriptdir}/pytest_textual_snapshot_resources
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%{py3_sitescriptdir}/pytest_textual_snapshot.py
+%{py3_sitescriptdir}/__pycache__/pytest_textual_snapshot.cpython-*.py[co]
+%{py3_sitescriptdir}/pytest_textual_snapshot_resources
+%{py3_sitescriptdir}/pytest_textual_snapshot-%{version}.dist-info
diff --git a/pytest_textual_snapshot-syrupy5.patch b/pytest_textual_snapshot-syrupy5.patch
new file mode 100644
index 0000000..cc99c5a
--- /dev/null
+++ b/pytest_textual_snapshot-syrupy5.patch
@@ -0,0 +1,43 @@
+From 4ed080a406331e697f64187e9cff29b04d0c7c61 Mon Sep 17 00:00:00 2001
+From: Max Rossmannek <max at rossmannek.de>
+Date: Mon, 24 Nov 2025 08:21:51 +0100
+Subject: [PATCH] Update syrupy
+
+---
+ pyproject.toml             | 2 +-
+ pytest_textual_snapshot.py | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index a36204b..1193ecc 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -33,7 +33,7 @@ python = "^3.8.1"
+ pytest = ">=8.0.0"
+ rich = ">=12.0.0"
+ textual = ">=0.28.0"
+-syrupy = "4.8.0"
++syrupy = ">=5.0.0"
+ jinja2 = ">=3.0.0"
+ 
+ [tool.poetry.plugins."pytest11"]
+diff --git a/pytest_textual_snapshot.py b/pytest_textual_snapshot.py
+index 44c5fd4..1820d4c 100644
+--- a/pytest_textual_snapshot.py
++++ b/pytest_textual_snapshot.py
+@@ -31,12 +31,12 @@
+ 
+ 
+ class SVGImageExtension(SingleFileSnapshotExtension):
+-    _file_extension = "svg"
++    file_extension = "svg"
+     _write_mode = WriteMode.TEXT
+ 
+-    def _read_snapshot_data_from_location(self, *args, **kwargs) -> Optional["SerializableData"]:
++    def read_snapshot_data_from_location(self, *args, **kwargs) -> Optional["SerializableData"]:
+         """Normalize SVG data right after they are loaded from persistent storage."""
+-        data = super()._read_snapshot_data_from_location(*args, **kwargs)
++        data = super().read_snapshot_data_from_location(*args, **kwargs)
+         if data is not None:
+             data = normalize_svg(data)
+         return data
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pytest-textual-snapshot.git/commitdiff/01eafb6c130b4bf8ec6bf42625d9350ad49e51ad



More information about the pld-cvs-commit mailing list