From 1bcef5621933e39912e9844844960674691cfdbb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 18 Apr 2020 15:49:20 +0200 Subject: [PATCH] dev-python/pytest-mock: Bump to 3.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/pytest-mock/Manifest | 1 + .../pytest-mock/pytest-mock-3.0.0.ebuild | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 dev-python/pytest-mock/pytest-mock-3.0.0.ebuild diff --git a/dev-python/pytest-mock/Manifest b/dev-python/pytest-mock/Manifest index d3c42f606d28..89be5f6ad5cd 100644 --- a/dev-python/pytest-mock/Manifest +++ b/dev-python/pytest-mock/Manifest @@ -1,2 +1,3 @@ DIST pytest-mock-1.11.2.tar.gz 22825 BLAKE2B d6843d1cb1afc0d5a242103ec4900d56418198b84fa037faf4b6841d7fbfd388273a819a26bfe051e6030690105e74211a27d2b864448598962b3e03788958fa SHA512 6dc927ce35001d088bddd9d79e024141b9e8163033b07af14b1f63330ef8b93dbf88649702f8fcc4f6ad314212fa5cbd39486b539811ec918450b3f7a716f96c DIST pytest-mock-2.0.0.tar.gz 24665 BLAKE2B 31a3464e8bff5a2109716e95492ce1d59f2555769e69cccf4012bc268f88c5eeca99924006bdc78cc5e20cf227860d845bead9656aba1c081da58effb38ea100 SHA512 8bd7f634afebeae628470270c81f0198647bf8cd5b0fac438891d881d9823e40e814d598670bb9c9722b864990958e69d385c7c6a6e2adc81d2adcb303fbe0b0 +DIST pytest-mock-3.0.0.tar.gz 24299 BLAKE2B 0d800a37bbc17c5f4033e6cc0e4d0587e82c42ff8097260d766841dd11e4b948d6cb1c9a0a0cbd11cc4e78c247b69475295c82ecb3a20816d59132ff6f99b4e9 SHA512 93046c63b4d7f699f88e0d29a0180e3609417ced97427a60db6427a633584d3a10bb92a7e93ef2cdc12268f4c03d579524dc46e1aad6a1196c02958ae81af8ba diff --git a/dev-python/pytest-mock/pytest-mock-3.0.0.ebuild b/dev-python/pytest-mock/pytest-mock-3.0.0.ebuild new file mode 100644 index 000000000000..b5ce25c092dc --- /dev/null +++ b/dev-python/pytest-mock/pytest-mock-3.0.0.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_SETUPTOOLS=rdepend +PYTHON_COMPAT=( python3_{6,7,8} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Thin-wrapper around the mock package for easier use with pytest" +HOMEPAGE="https://github.com/pytest-dev/pytest-mock/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" + +RDEPEND="dev-python/pytest[${PYTHON_USEDEP}]" +BDEPEND=" + dev-python/setuptools_scm[${PYTHON_USEDEP}]" + +distutils_enable_tests pytest + +src_prepare() { + if has_version dev-python/mock; then + # test fails when standalone mock is installed + sed -e 's|^\(def \)\(test_standalone_mock(\)|\1_\2|' -i tests/test_pytest_mock.py || die + fi + distutils-r1_src_prepare +} + +python_test() { + distutils_install_for_testing + pytest --assert=plain -vv || die "Tests fail with ${EPYTHON}" +} -- 2.26.2