diff --git a/dev-python/pytest-snapshot/Manifest b/dev-python/pytest-snapshot/Manifest new file mode 100644 index 0000000000..41a09617fd --- /dev/null +++ b/dev-python/pytest-snapshot/Manifest @@ -0,0 +1 @@ +DIST pytest-snapshot-0.9.0.tar.gz 19877 BLAKE2B 2be9dfb5b4307b06f8633199e540a9635420ea0e783602fdc08321ceb8df2d1dfab241dc933e188c7ad252fffeef9960d78905c578da87af69c6e0fb77586c34 SHA512 ad0ce310ea8927dfac1ae07bae0bfb6651cfe4cb9e0ec17475923eaee4a64cac99ca24840da3831dfc24a514cde09cd9433fa896316646ba40078b46d8f079db diff --git a/dev-python/pytest-snapshot/files/pytest-snapshot-0.9.0-pytest8.patch b/dev-python/pytest-snapshot/files/pytest-snapshot-0.9.0-pytest8.patch new file mode 100644 index 0000000000..4b1306b397 --- /dev/null +++ b/dev-python/pytest-snapshot/files/pytest-snapshot-0.9.0-pytest8.patch @@ -0,0 +1,21 @@ +https://github.com/joseph-roitman/pytest-snapshot/issues/71 +https://github.com/joseph-roitman/pytest-snapshot/pull/72 + +From c9df38f672d42f13ab519ad7a9337d7b44b87346 Mon Sep 17 00:00:00 2001 +From: Reuven Peleg <4018286+R-Peleg@users.noreply.github.com> +Date: Tue, 9 Jul 2024 10:58:50 +0300 +Subject: [PATCH] Allow the '(' in the new pytest's output + +--- a/tests/test_assert_match.py ++++ b/tests/test_assert_match.py +@@ -87,8 +87,8 @@ def test_sth(snapshot): + r"E* assert * == *", + r"E* At index 4 diff: * != *", + r"E* Full diff:", +- r"E* - b'the valu\xc3\x89 of snapshot1.txt{}'".format(repr(os.linesep)[1:-1]), +- r"E* + b'the INCORRECT value of snapshot1.txt{}'".format(repr(os.linesep)[1:-1]), ++ r"E* - *b'the valu\xc3\x89 of snapshot1.txt{}'*".format(repr(os.linesep)[1:-1]), ++ r"E* + *b'the INCORRECT value of snapshot1.txt{}'*".format(repr(os.linesep)[1:-1]), + ]) + assert result.ret == 1 + diff --git a/dev-python/pytest-snapshot/metadata.xml b/dev-python/pytest-snapshot/metadata.xml new file mode 100644 index 0000000000..505dba9377 --- /dev/null +++ b/dev-python/pytest-snapshot/metadata.xml @@ -0,0 +1,13 @@ + + + + + negril.nx+gentoo@gmail.com + Paul Zander + + + + joseph-roitman/pytest-snapshot + pytest-snapshot + + diff --git a/dev-python/pytest-snapshot/pytest-snapshot-0.9.0.ebuild b/dev-python/pytest-snapshot/pytest-snapshot-0.9.0.ebuild new file mode 100644 index 0000000000..ad46fcded9 --- /dev/null +++ b/dev-python/pytest-snapshot/pytest-snapshot-0.9.0.ebuild @@ -0,0 +1,36 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_NO_NORMALIZE=1 +PYTHON_COMPAT=( python3_{12..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="A plugin for snapshot testing with pytest" +HOMEPAGE=" + https://github.com/joseph-roitman/pytest-snapshot/ + https://pypi.org/project/pytest-snapshot/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=dev-python/pytest-3.0.0[${PYTHON_USEDEP}] +" +BDEPEND=" + dev-python/setuptools-scm[${PYTHON_USEDEP}] + dev-python/wheel[${PYTHON_USEDEP}] +" + +EPYTEST_PLUGINS=( pytest-snapshot ) +EPYTEST_PLUGIN_LOAD_VIA_ENV=1 +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/pytest-snapshot-0.9.0-pytest8.patch +)