diff --git a/dev-python/pytest-mock/Manifest b/dev-python/pytest-mock/Manifest index cdbfe857e5b09..d0ad20fa7ccc7 100644 --- a/dev-python/pytest-mock/Manifest +++ b/dev-python/pytest-mock/Manifest @@ -1 +1,2 @@ DIST pytest_mock-3.14.1.tar.gz 33241 BLAKE2B bfc638313f3169e2eb5ed69d6eaa89742cc43a39b51c2d41860848f03bbdcd062749294526cb555fafb99fadc4c566ed6cf96baf2491b74d0aec69f9d793c9ff SHA512 fff44e9520ce5cb55f259f60af5a9cc2c114e0b94d9493cd87381fc0939cfa89a6370304369ab2e5b06b3437c7525175860d35e526c2e9c84f01c0e47bab9cf9 +DIST pytest_mock-3.15.0.tar.gz 33838 BLAKE2B 3830a747e7e35fbf4a696ce131406606808d230547ffbdc0dbaf8c4aac2e05ee7a73143c6b364deaa017cf70b2be04c44ccd9755f49fec195f2ec87d31a75409 SHA512 4687b94b6e68e18c2f44244b7200a80689fffca94f8d5f18aa75541496e20fd547c8f8b530af3cfffd3872c3c7b386a1070a2a16d2d11c4ce5504e65e30795ca diff --git a/dev-python/pytest-mock/pytest-mock-3.15.0.ebuild b/dev-python/pytest-mock/pytest-mock-3.15.0.ebuild new file mode 100644 index 0000000000000..dff52107d43b7 --- /dev/null +++ b/dev-python/pytest-mock/pytest-mock-3.15.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_TESTED=( python3_{11..14} pypy3_11 ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_{13,14}t ) + +inherit distutils-r1 pypi + +DESCRIPTION="Thin-wrapper around the mock package for easier use with pytest" +HOMEPAGE=" + https://github.com/pytest-dev/pytest-mock/ + https://pypi.org/project/pytest-mock/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-python/pytest-6.2.5[${PYTHON_USEDEP}] +" +BDEPEND=" + dev-python/setuptools-scm[${PYTHON_USEDEP}] + test? ( + $(python_gen_cond_dep ' + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + ' "${PYTHON_TESTED[@]}") + ) +" + +python_test() { + if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then + einfo "Skipping tests on ${EPYTHON}" + return + fi + + local EPYTEST_PLUGINS=( "${PN}" pytest-asyncio ) + local EPYTEST_PLUGIN_LOAD_VIA_ENV=1 + local EPYTEST_DESELECT=() + + if has_version dev-python/mock; then + EPYTEST_DESELECT+=( + tests/test_pytest_mock.py::test_standalone_mock + ) + fi + + epytest --assert=plain +}