diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/pytest-mock | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'dev-python/pytest-mock')
| -rw-r--r-- | dev-python/pytest-mock/Manifest | 4 | ||||
| -rw-r--r-- | dev-python/pytest-mock/files/pytest-mock-2.0.0-warnings.patch | 36 | ||||
| -rw-r--r-- | dev-python/pytest-mock/files/pytest-mock-3.1.0-warnings.patch | 39 | ||||
| -rw-r--r-- | dev-python/pytest-mock/metadata.xml | 15 | ||||
| -rw-r--r-- | dev-python/pytest-mock/pytest-mock-1.11.2.ebuild | 42 | ||||
| -rw-r--r-- | dev-python/pytest-mock/pytest-mock-2.0.0.ebuild | 42 | ||||
| -rw-r--r-- | dev-python/pytest-mock/pytest-mock-3.1.0.ebuild | 41 | ||||
| -rw-r--r-- | dev-python/pytest-mock/pytest-mock-3.1.1.ebuild | 41 |
8 files changed, 260 insertions, 0 deletions
diff --git a/dev-python/pytest-mock/Manifest b/dev-python/pytest-mock/Manifest new file mode 100644 index 000000000000..e7dcf76862fc --- /dev/null +++ b/dev-python/pytest-mock/Manifest @@ -0,0 +1,4 @@ +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.1.0.tar.gz 25003 BLAKE2B 5f12bc664c6342912e0326bc4ac20c1e599f13c047964df3943ae5d31b8a3710406bc4d30bc2c2304c0fffefd0f49441644b667fdbf79426809c230e5b2ecc78 SHA512 6e970aeb1d4086df045a355e11969074e761fcdc3c8486e0405a4051cdf7c4425ae264e7005afe7afe5356f73061ad5f4cbad05b3ce2f55681a3e12ce1a6b671 +DIST pytest-mock-3.1.1.tar.gz 25038 BLAKE2B 416a84af52980d6984b4a2fd63a75fc79bf27fead86e7d0950f6dfcf38bfc27befbf86bdf8d6361b19a4e45c0bf6965d7a57bea5e3fff29a361e0cdb542ef0a1 SHA512 8e55bd7dc45de2c35fbbbbf4385ea805e6546c8d894f3b351bc31fe1c6d9c790f9e14f79de01262c18634d9dfd5142be7520181f1195faccba1f0e8a06ffe675 diff --git a/dev-python/pytest-mock/files/pytest-mock-2.0.0-warnings.patch b/dev-python/pytest-mock/files/pytest-mock-2.0.0-warnings.patch new file mode 100644 index 000000000000..bea2bb14b15d --- /dev/null +++ b/dev-python/pytest-mock/files/pytest-mock-2.0.0-warnings.patch @@ -0,0 +1,36 @@ +From 09477f0d28f3b6b9fa36b861d701c9d1a937e553 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Tue, 26 May 2020 10:56:27 +0200 +Subject: [PATCH] Permit warnings in *_stale_pyc tests + +The *_stale_pyc test is repeatedly failing on production systems +due to additional pytest plugins being installed and triggering +PytestAssertRewriteWarnings. This causes 'passed *' string not to match +because of the ',' after 'passed'. Match just 'passed*' instead +to solve this. +--- + tests/test_pytest_mock.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py +index d1635f5..e85f392 100644 +--- a/tests/test_pytest_mock.py ++++ b/tests/test_pytest_mock.py +@@ -801,7 +801,7 @@ def test_abort_patch_context_manager_with_stale_pyc(testdir): + """ + ) + result = testdir.runpytest() +- result.stdout.fnmatch_lines("* 1 passed *") ++ result.stdout.fnmatch_lines("* 1 passed*") + + kwargs = {"legacy": True} if sys.version_info[0] >= 3 else {} + assert compileall.compile_file(str(py_fn), **kwargs) +@@ -811,4 +811,4 @@ def test_abort_patch_context_manager_with_stale_pyc(testdir): + + py_fn.remove() + result = testdir.runpytest() +- result.stdout.fnmatch_lines("* 1 passed *") ++ result.stdout.fnmatch_lines("* 1 passed*") +-- +2.26.2 + diff --git a/dev-python/pytest-mock/files/pytest-mock-3.1.0-warnings.patch b/dev-python/pytest-mock/files/pytest-mock-3.1.0-warnings.patch new file mode 100644 index 000000000000..4851afe9d1ba --- /dev/null +++ b/dev-python/pytest-mock/files/pytest-mock-3.1.0-warnings.patch @@ -0,0 +1,39 @@ +From 1ef3d6111a8e4f32dfa9a2c311b6996afd9e98a5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Tue, 26 May 2020 10:56:27 +0200 +Subject: [PATCH] Permit warnings in *_stale_pyc tests + +The *_stale_pyc test is repeatedly failing on production systems +due to additional pytest plugins being installed and triggering +PytestAssertRewriteWarnings. This causes 'passed *' string not to match +because of the ',' after 'passed'. Match just 'passed*' instead +to solve this. +--- + tests/test_pytest_mock.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py +index 73509a4..5e1a502 100644 +--- a/tests/test_pytest_mock.py ++++ b/tests/test_pytest_mock.py +@@ -809,7 +809,7 @@ def test_abort_patch_context_manager_with_stale_pyc(testdir): + """ + ) + result = testdir.runpytest() +- result.stdout.fnmatch_lines("* 1 passed *") ++ result.stdout.fnmatch_lines("* 1 passed*") + + kwargs = {"legacy": True} + assert compileall.compile_file(str(py_fn), **kwargs) +@@ -819,7 +819,7 @@ def test_abort_patch_context_manager_with_stale_pyc(testdir): + + py_fn.remove() + result = testdir.runpytest() +- result.stdout.fnmatch_lines("* 1 passed *") ++ result.stdout.fnmatch_lines("* 1 passed*") + + + def test_used_with_class_scope(testdir): +-- +2.26.2 + diff --git a/dev-python/pytest-mock/metadata.xml b/dev-python/pytest-mock/metadata.xml new file mode 100644 index 000000000000..d07ec7fc66c4 --- /dev/null +++ b/dev-python/pytest-mock/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <remote-id type="pypi">pytest-mock</remote-id> + <remote-id type="github">pytest-dev/pytest-mock</remote-id> + </upstream> + <maintainer type="person"> + <email>zmedico@gentoo.org</email> + </maintainer> + <maintainer type="project"> + <email>python@gentoo.org</email> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/dev-python/pytest-mock/pytest-mock-1.11.2.ebuild b/dev-python/pytest-mock/pytest-mock-1.11.2.ebuild new file mode 100644 index 000000000000..8b643a363b3a --- /dev/null +++ b/dev-python/pytest-mock/pytest-mock-1.11.2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Thin-wrapper around the mock package for easier use with py.test" +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}] + $(python_gen_cond_dep '>=dev-python/mock-2[${PYTHON_USEDEP}]' -2)" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/setuptools_scm[${PYTHON_USEDEP}]" + +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 + sed -e 's|^\( def \)\(test_failure_message_with_no_name(\)|\1_\2|' \ + -e 's|^\( def \)\(test_failure_message_with_name(\)|\1_\2|' \ + -e 's|^\(def \)\(test_detailed_introspection(\)|\1_\2|' \ + -e 's|^\(def \)\(test_assert_called_args_with_introspection(\)|\1_\2|' \ + -e 's|^\(def \)\(test_assert_called_kwargs_with_introspection(\)|\1_\2|' \ + -i tests/test_pytest_mock.py || die + distutils-r1_src_prepare +} + +python_test() { + local -x PYTHONPATH=${PWD}${PYTHONPATH:+:}${PYTHONPATH} + py.test -vv tests/test_pytest_mock.py || die "Tests fail with ${EPYTHON}" +} diff --git a/dev-python/pytest-mock/pytest-mock-2.0.0.ebuild b/dev-python/pytest-mock/pytest-mock-2.0.0.ebuild new file mode 100644 index 000000000000..045b6a938e82 --- /dev/null +++ b/dev-python/pytest-mock/pytest-mock-2.0.0.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_SETUPTOOLS=rdepend +PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} 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}] + $(python_gen_cond_dep '>=dev-python/mock-2[${PYTHON_USEDEP}]' -2)" +BDEPEND=" + dev-python/setuptools_scm[${PYTHON_USEDEP}]" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/pytest-mock-2.0.0-warnings.patch +) + +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}" +} diff --git a/dev-python/pytest-mock/pytest-mock-3.1.0.ebuild b/dev-python/pytest-mock/pytest-mock-3.1.0.ebuild new file mode 100644 index 000000000000..816375eebd1c --- /dev/null +++ b/dev-python/pytest-mock/pytest-mock-3.1.0.ebuild @@ -0,0 +1,41 @@ +# 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,9} 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-5[${PYTHON_USEDEP}]" +BDEPEND=" + dev-python/setuptools_scm[${PYTHON_USEDEP}]" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/pytest-mock-3.1.0-warnings.patch +) + +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}" +} diff --git a/dev-python/pytest-mock/pytest-mock-3.1.1.ebuild b/dev-python/pytest-mock/pytest-mock-3.1.1.ebuild new file mode 100644 index 000000000000..145bc659f1e9 --- /dev/null +++ b/dev-python/pytest-mock/pytest-mock-3.1.1.ebuild @@ -0,0 +1,41 @@ +# 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,9} 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-5[${PYTHON_USEDEP}]" +BDEPEND=" + dev-python/setuptools_scm[${PYTHON_USEDEP}]" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/pytest-mock-3.1.0-warnings.patch +) + +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}" +} |
