Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-mock/
Date: Sat, 26 Oct 2019 20:33:46
Message-Id: 1572122011.a0700b404610252e50537c7ca6b0c5f29aff6726.zmedico@gentoo
1 commit: a0700b404610252e50537c7ca6b0c5f29aff6726
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 26 20:25:25 2019 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 26 20:33:31 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0700b40
7
8 dev-python/pytest-mock: Bump to version 1.11.2
9
10 Reported-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11 Closes: https://bugs.gentoo.org/698554
12 Package-Manager: Portage-2.3.78, Repoman-2.3.17
13 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
14
15 dev-python/pytest-mock/Manifest | 1 +
16 dev-python/pytest-mock/pytest-mock-1.11.2.ebuild | 39 ++++++++++++++++++++++++
17 2 files changed, 40 insertions(+)
18
19 diff --git a/dev-python/pytest-mock/Manifest b/dev-python/pytest-mock/Manifest
20 index a6cc65b2e1a..f9ac3ad3468 100644
21 --- a/dev-python/pytest-mock/Manifest
22 +++ b/dev-python/pytest-mock/Manifest
23 @@ -1,3 +1,4 @@
24 DIST pytest-mock-1.10.0.tar.gz 20754 BLAKE2B db60bfe6ee9d6d0a6ee4f0df7f5efa6ef05f5e2360945aa86ff6de02fc6a01f1e6715cbb61ced0c1e737c300965835fb08727b926852c5b71c0cc3d56c1171f1 SHA512 b8afba13da3e598b6493459298e395c0ecc06538733916659191bd5c5c22f40b0e296853ad940c16a6d492fcf46b2daf490ee589661d391e2c7cd1deb84da756
25 +DIST pytest-mock-1.11.2.tar.gz 22825 BLAKE2B d6843d1cb1afc0d5a242103ec4900d56418198b84fa037faf4b6841d7fbfd388273a819a26bfe051e6030690105e74211a27d2b864448598962b3e03788958fa SHA512 6dc927ce35001d088bddd9d79e024141b9e8163033b07af14b1f63330ef8b93dbf88649702f8fcc4f6ad314212fa5cbd39486b539811ec918450b3f7a716f96c
26 DIST pytest-mock-1.6.0.tar.gz 17780 BLAKE2B 4fbc0cbd951668eb2ce427496c54e958591fe368bd42544eb1d0379adcb3d0e10b223ab044956e4003aac88665b3132dcb9d167442d6d85a5be79edea36881ca SHA512 c3b897be9156d57d7012e95b620c543500b849d7076224e3328d3783311210c57141dfb82c01bb98e5e419125dce0f68f6631bd610f4909f5ac1798458a7949f
27 DIST pytest-mock-1.6.3.tar.gz 18482 BLAKE2B 1c0d366e5afd1b247ff454716b6d96d9d68846adfff81adc0ea079a72d3e7710fd9385122723cfee69965588235ec2deb1e0b52328ace5c967652c93b404cea3 SHA512 6857f373728d3f2c6b152d4f89da3590e2e74795695dc9f4f3704a4e0250e49d705ce0de4121a801ac35c83217678a95a5023338124293ca74db406941f5072a
28
29 diff --git a/dev-python/pytest-mock/pytest-mock-1.11.2.ebuild b/dev-python/pytest-mock/pytest-mock-1.11.2.ebuild
30 new file mode 100644
31 index 00000000000..9abdcee85b1
32 --- /dev/null
33 +++ b/dev-python/pytest-mock/pytest-mock-1.11.2.ebuild
34 @@ -0,0 +1,39 @@
35 +# Copyright 1999-2019 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy pypy3 )
40 +
41 +inherit distutils-r1
42 +
43 +DESCRIPTION="Thin-wrapper around the mock package for easier use with py.test"
44 +HOMEPAGE="https://github.com/pytest-dev/pytest-mock/"
45 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
46 +
47 +LICENSE="MIT"
48 +SLOT="0"
49 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
50 +IUSE=""
51 +
52 +RDEPEND="dev-python/pytest[${PYTHON_USEDEP}]
53 + $(python_gen_cond_dep '>=dev-python/mock-2[${PYTHON_USEDEP}]' -2)"
54 +DEPEND="${RDEPEND}
55 + dev-python/setuptools[${PYTHON_USEDEP}]
56 + dev-python/setuptools_scm[${PYTHON_USEDEP}]"
57 +
58 +src_prepare() {
59 + if has_version dev-python/mock; then
60 + # test fails when standalone mock is installed
61 + sed -e 's|^\(def \)\(test_standalone_mock(\)|\1_\2|' -i tests/test_pytest_mock.py || die
62 + fi
63 + sed -e 's|^\( def \)\(test_failure_message_with_no_name(\)|\1_\2|' \
64 + -e 's|^\( def \)\(test_failure_message_with_name(\)|\1_\2|' \
65 + -e 's|^\(def \)\(test_detailed_introspection(\)|\1_\2|' \
66 + -i tests/test_pytest_mock.py || die
67 + distutils-r1_src_prepare
68 +}
69 +
70 +python_test() {
71 + local -x PYTHONPATH=${PWD}${PYTHONPATH:+:}${PYTHONPATH}
72 + py.test -vv tests/test_pytest_mock.py || die "Tests fail with ${EPYTHON}"
73 +}