diff options
Diffstat (limited to 'dev-python/pytest-mock')
-rw-r--r-- | dev-python/pytest-mock/Manifest | 6 | ||||
-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/pytest-mock-2.0.0.ebuild | 6 | ||||
-rw-r--r-- | dev-python/pytest-mock/pytest-mock-3.1.0.ebuild | 10 |
5 files changed, 91 insertions, 6 deletions
diff --git a/dev-python/pytest-mock/Manifest b/dev-python/pytest-mock/Manifest index d03369dcad90..79b470e0ad7b 100644 --- a/dev-python/pytest-mock/Manifest +++ b/dev-python/pytest-mock/Manifest @@ -1,7 +1,9 @@ +AUX pytest-mock-2.0.0-warnings.patch 1363 BLAKE2B 67611daf7c070a0de2d368506b3e34653940f21bf565b0d7361b5f1e759c84533001f68483e1ca301e86cf2d734e10f973737f3775f898928c4b4c2d1aee9bf1 SHA512 6b306f19834559223af3e64372d46fed0146a783a6f134ed07883742b5ba1ad974fd3ba440376350345f939105e84abd8efdc7bf99cb9796eb638ba2c22e4e64 +AUX pytest-mock-3.1.0-warnings.patch 1373 BLAKE2B 1bac1315bb8d95d1e6435aa15415dd973d2834cd9fb68867b99d72f5b8233c736b40d3865d19ec9f4042387f3d01e57a0055f992fa7a37f2084c043be52c7e88 SHA512 177a318dee0957ff761d02db57890bedf3f780ce46e3d756f21c2c743d264e982eb9a711b17647ad2fb43e17f9f1b30808e943b5c89076b9c905c16e57a3e313 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 EBUILD pytest-mock-1.11.2.ebuild 1456 BLAKE2B 79673aaf4f03ec6c5475e68a5eb5960bea359f538af1f710daf205956cba1a6216f51656659ca17f6e2d52b64922be3c74499cfc85bc64cc937f1b3e7faead73 SHA512 77b1c578805b102cc04bb9f58273cbb238c128e2708968a3d9f27ca727a347cf3dbabf4d7e6bf7bf47f3356daa3345f62ae516f90c7f807b39e8c0a7089ba868 -EBUILD pytest-mock-2.0.0.ebuild 1049 BLAKE2B 970374b89da30b6841d500f20843d4be7c9aed48017d0ec6ae092dd4062d38841a593cc3bcfdcfd7371db692d8fd255614c60dc56ccd336af12b9723241e4de7 SHA512 2d29a5180bbf867f173826fb52dac47029c2d23602307d162a4a582666fed135a2dd9316a20767f85db3b204c39f823c1215724a7336f759352f17f7b03c51e7 -EBUILD pytest-mock-3.1.0.ebuild 972 BLAKE2B 4dd136d70013b0efcc3503ed9e6e946c42a328f44013c289e24bb3f78fe3b954959330a3d3adc89252048822cb0f39a77be5c0b5fdd8a46d6b4427f3fa91db29 SHA512 e54a0b8328426beda46c95c258734b47d13cc575ee6a1d1e2158570ceb5812d3899af4aa814b3a57fa430e1043fc36aa073c36366e11b7db390de5bcbbd6c670 +EBUILD pytest-mock-2.0.0.ebuild 1112 BLAKE2B e84f9be37980feef82140399dc81f41141ce42d2b3304bbb93c31b444975a1976fadbff5ebb5a9d4a1ad5127a04172a8d88d4d2be7c176560b980cb1d20de160 SHA512 c726eccf84c8e58b34a479cc7f0741f1e80830f39f631c223399f851351426b3959293990348823e794bbe25e0c0578d9ccb0990d1d03f87947e1a457e557979 +EBUILD pytest-mock-3.1.0.ebuild 1027 BLAKE2B 29447f8a361255e3abfa31d90ba9a734456e2a0cd0a8258b6fff0f7fa9527464c12d82620c0b3d1897257c1b816cdeb179099da85eb67e669a1521732533f961 SHA512 b2dd3c92f5906180f68b3d0e19b694c0a3aea7d41dfcbc815bf08ae9a9b688a1b23c1875bdd830ed76f1e2b342650d52f94ebbc970212eff3f23f964fe5db1d9 MISC metadata.xml 433 BLAKE2B 78d844dea9620760c0766eda59e09f93248fba58778f26fb4dd53e864ece455ede7299db90bec0fe11fdf64b762e2c660c260ce10e3758bb8e25024b1bf2877f SHA512 16324c7a2ce4e3e7261b9be389d646ba8e797719b6dd6782fd66311aefa262e338bac99c09a9399d55b362b941cecfc8039fa14e53b79e214359ba6d294c9529 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/pytest-mock-2.0.0.ebuild b/dev-python/pytest-mock/pytest-mock-2.0.0.ebuild index 9f85be239d87..045b6a938e82 100644 --- a/dev-python/pytest-mock/pytest-mock-2.0.0.ebuild +++ b/dev-python/pytest-mock/pytest-mock-2.0.0.ebuild @@ -4,7 +4,7 @@ EAPI=7 DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 ) +PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 ) inherit distutils-r1 @@ -24,6 +24,10 @@ BDEPEND=" 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 diff --git a/dev-python/pytest-mock/pytest-mock-3.1.0.ebuild b/dev-python/pytest-mock/pytest-mock-3.1.0.ebuild index b5ce25c092dc..0c137d01ff10 100644 --- a/dev-python/pytest-mock/pytest-mock-3.1.0.ebuild +++ b/dev-python/pytest-mock/pytest-mock-3.1.0.ebuild @@ -4,7 +4,7 @@ EAPI=7 DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_{6,7,8} pypy3 ) +PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 ) inherit distutils-r1 @@ -14,15 +14,19 @@ 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" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~sparc ~x86" IUSE="" -RDEPEND="dev-python/pytest[${PYTHON_USEDEP}]" +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 |