1 |
commit: 80bbe3693a2e3eb7b0c6c216fc6dc2c44e4ea631 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 28 18:33:32 2022 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 28 18:38:42 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80bbe369 |
7 |
|
8 |
dev-python/pytest-mock: add 3.7.0 |
9 |
|
10 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
11 |
|
12 |
dev-python/pytest-mock/Manifest | 1 + |
13 |
dev-python/pytest-mock/pytest-mock-3.7.0.ebuild | 36 +++++++++++++++++++++++++ |
14 |
2 files changed, 37 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pytest-mock/Manifest b/dev-python/pytest-mock/Manifest |
17 |
index c05c153f9057..ca407a500dc0 100644 |
18 |
--- a/dev-python/pytest-mock/Manifest |
19 |
+++ b/dev-python/pytest-mock/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST pytest-mock-3.6.1.tar.gz 29933 BLAKE2B 6c22d23f3a8e9b5ef26f990325f5a2c2897b60f61f84472716a1f984e72a8c38f6992e439ef581d7772e25a5fe9e76d190697d9c7bc8b5dcbf6375bead4b3dc3 SHA512 50a8ffbac1b20b1962558789b24d50c1e7d8d2e2706ee15a576eb5fd1b40d4523482dce7a1078d532b686ff8d38b6d769d356b04241528a0196e14acae0b6199 |
22 |
+DIST pytest-mock-3.7.0.tar.gz 29311 BLAKE2B 27227b66008c70c4016c8e15d0021a67e84730a8b49c5664dc4f29e16d5f163df293269ab332707e44b7a0b182e15e20ab0ebaf4b9d923eb911083377972dad1 SHA512 6ba69e86bac8a430a9f1f1c615ad21f505b87848ac50fc551bc02f81306bf8769fd015615d96085d87d4c695c24b0686a95116721358687b48b64de5d0ae6901 |
23 |
|
24 |
diff --git a/dev-python/pytest-mock/pytest-mock-3.7.0.ebuild b/dev-python/pytest-mock/pytest-mock-3.7.0.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..bd52ca1d9ea7 |
27 |
--- /dev/null |
28 |
+++ b/dev-python/pytest-mock/pytest-mock-3.7.0.ebuild |
29 |
@@ -0,0 +1,36 @@ |
30 |
+# Copyright 1999-2022 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
34 |
+ |
35 |
+DISTUTILS_USE_PEP517=setuptools |
36 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
37 |
+inherit distutils-r1 |
38 |
+ |
39 |
+DESCRIPTION="Thin-wrapper around the mock package for easier use with pytest" |
40 |
+HOMEPAGE="https://github.com/pytest-dev/pytest-mock/" |
41 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
42 |
+ |
43 |
+LICENSE="MIT" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos" |
46 |
+ |
47 |
+RDEPEND=">=dev-python/pytest-6[${PYTHON_USEDEP}]" |
48 |
+BDEPEND="dev-python/setuptools_scm[${PYTHON_USEDEP}]" |
49 |
+ |
50 |
+distutils_enable_tests pytest |
51 |
+ |
52 |
+src_prepare() { |
53 |
+ sed -e 's/runpytest_subprocess(/&"-p","no:xprocess",/' -i tests/test_pytest_mock.py || die |
54 |
+ distutils-r1_src_prepare |
55 |
+} |
56 |
+ |
57 |
+python_test() { |
58 |
+ if has_version dev-python/mock; then |
59 |
+ local EPYTEST_DESELECT=( |
60 |
+ tests/test_pytest_mock.py::test_standalone_mock |
61 |
+ ) |
62 |
+ fi |
63 |
+ |
64 |
+ epytest --assert=plain |
65 |
+} |