diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-09-26 00:01:26 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-09-26 00:01:26 +0200 |
commit | 5f5176fe3da027123bc6419b6fb30a1851bab694 (patch) | |
tree | b79740fd3ad796889d46d8188c770b9d7c45f332 /dev-python/flexmock | |
parent | dev-python/dicttoxml: Remove old (diff) | |
download | gentoo-5f5176fe3da027123bc6419b6fb30a1851bab694.tar.gz gentoo-5f5176fe3da027123bc6419b6fb30a1851bab694.tar.bz2 gentoo-5f5176fe3da027123bc6419b6fb30a1851bab694.zip |
dev-python/flexmock: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/flexmock')
-rw-r--r-- | dev-python/flexmock/Manifest | 3 | ||||
-rw-r--r-- | dev-python/flexmock/files/flexmock-0.10.6-fix-with_args-sys.stdout.write.patch | 60 | ||||
-rw-r--r-- | dev-python/flexmock/flexmock-0.10.4.ebuild | 23 | ||||
-rw-r--r-- | dev-python/flexmock/flexmock-0.10.6.ebuild | 31 | ||||
-rw-r--r-- | dev-python/flexmock/flexmock-0.10.8.ebuild | 27 |
5 files changed, 0 insertions, 144 deletions
diff --git a/dev-python/flexmock/Manifest b/dev-python/flexmock/Manifest index e0f551979699..0325d3417eef 100644 --- a/dev-python/flexmock/Manifest +++ b/dev-python/flexmock/Manifest @@ -1,5 +1,2 @@ DIST flexmock-0.10.10.tar.gz 49201 BLAKE2B f5d77398ac14a002f78790d4e03f93bcd00c016e6a5eb0be45ce3b59a223159656ab694a1dd1124cbac351680fef25084d69e9533d668177ea73b9e458df5b6f SHA512 211939bf40ecb25981a70d5bfe897ef8127ef38d5adf6a48b086c4b6f49b05e1a04f09afb73f428e3eb21a8090ba33ca86e605c2c1ac70d9fc269fdd640ccb73 -DIST flexmock-0.10.4.tar.gz 45362 BLAKE2B 4ff79cff3b0d8fb0c97bd60b0d5aa5555a7b939d3d6275a17c9bd1002b1d7acb53d4f63f5f834faf0d349d8b8d429eb063f121c4d7b6d12aa1bb3e7bdbadb861 SHA512 d190fcb66f0c2c4e3be2384d68b95a22c695ffa0fe8f8a218f2baa68c91683641396197cac69ddab21e4b0990b9930f56423bb7cd85770ceade9c22ece72cedc -DIST flexmock-0.10.6.tar.gz 46740 BLAKE2B b5c8083694e8787e85ff0f41265ad9f716a4c82d274ca5c793b6d93bf8bf28f3e57afd33f7ba59149e75f7bffbebd3843901dfa75caaefc6f76f3eef0c603314 SHA512 2ebaed78926f01bd4d886a509d978d0de04629f7d96c48f846b8ccf7906bb2303e7cbeab8226c6eb98d058f940434144cc2d6300d6aa2533f1f217788211490e -DIST flexmock-0.10.8.tar.gz 46905 BLAKE2B d5f28e012edf9678fd5f72ec1d99e4e98b00dbb36536877cb393c16563097e0e3f18ab24243f7090bfa306f8be194243d201d9aaf5d64491bb594cff82b60e1e SHA512 cac327b3e3c4c6ccbcd6c7f71863b67fdd5454c13bbd5403b3ba521e3ae945ba453152df623eef08b2b60210ba626447a9e6bad76c2215281d43ae0f42ebf1a9 DIST flexmock-0.10.9.tar.gz 48466 BLAKE2B b6c73fdb6d281870806db7b34d43d8f116c29ff28a3753e7873868e66df9a34f8f4cfa0c1a7f1fd620a58a46b4376538a8a64994ed82d500a850f86c24fe54d2 SHA512 6e39e5a88b1d744d348f834f4664fc477412f6f09dd2500ef35a52126ce14f9e8d24a04c1ceb16c24b31bc40c3d8276f2efa75a701ecf284bb2cb5388513a75f diff --git a/dev-python/flexmock/files/flexmock-0.10.6-fix-with_args-sys.stdout.write.patch b/dev-python/flexmock/files/flexmock-0.10.6-fix-with_args-sys.stdout.write.patch deleted file mode 100644 index 0c3988e41788..000000000000 --- a/dev-python/flexmock/files/flexmock-0.10.6-fix-with_args-sys.stdout.write.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 020ebef66523e9496f8042beb9384f3f770a6412 Mon Sep 17 00:00:00 2001 -From: Arthur Zamarin <arthurzam@gentoo.org> -Date: Thu, 19 Aug 2021 20:39:04 +0300 -Subject: [PATCH] Fix with_args not working with sys.stdout.write - -https://github.com/flexmock/flexmock/commit/513265e731fc4daceeb19123a4e71d652b990a1a - -Backported to 0.10.6 by Arthur Zamarin <arthurzam@gentoo.org> - ---- a/flexmock.py -+++ b/flexmock.py -@@ -254,13 +254,13 @@ class Expectation(object): - # - it's not a static method - # - the mocked object is a module - module "methods" are in fact plain functions; - # unless they're classes, which means they still have __init__ -- is_method = ((inspect.ismethod(self.original) or inspect.isfunction(self.original) -- or _isclass(self.original)) and -- self.method_type is not staticmethod and -- (not isinstance(self._mock, types.ModuleType) or -- _isclass(self.original))) -+ is_builtin_method = isinstance(self.original, types.BuiltinMethodType) -+ is_method = inspect.ismethod(self.original) and self.method_type is not staticmethod -+ is_class = inspect.isclass(self.original) -+ is_class_method = (inspect.isfunction(self.original) and inspect.isclass(self.mock) -+ and self.method_type is not staticmethod) - args_len = len(allowed.args) -- if is_method: -+ if is_builtin_method or is_method or is_class or is_class_method: - args_len -= 1 - minimum = args_len - (allowed.defaults and len(allowed.defaults) or 0) - maximum = None ---- a/tests/flexmock_test.py -+++ b/tests/flexmock_test.py -@@ -17,6 +17,7 @@ from flexmock import ReturnValue - from flexmock import flexmock_teardown - from flexmock import _format_args - from flexmock import _isproperty -+import random - import flexmock - import re - import sys -@@ -308,6 +309,15 @@ class RegularClass(object): - assertEqual('got an int', mock.method_foo(23)) - assertRaises(MethodSignatureError, mock.method_foo, 2.0) - -+ def test_with_args_should_work_with_builtin_c_functions_and_methods(self): -+ flexmock(sys.stdout).should_call("write") # set fall-through -+ flexmock(sys.stdout).should_receive("write").with_args("flexmock_builtin_test").once() -+ sys.stdout.write("flexmock_builtin_test") -+ -+ def test_with_args_should_work_with_builtin_python_methods(self): -+ flexmock(random).should_receive("randint").with_args(1, 10).once() -+ random.randint(1, 10) -+ - def test_flexmock_should_match_expectations_against_user_defined_classes(self): - mock = flexmock(name='temp') - --- -2.33.0 - diff --git a/dev-python/flexmock/flexmock-0.10.4.ebuild b/dev-python/flexmock/flexmock-0.10.4.ebuild deleted file mode 100644 index 5be99a9dfb3e..000000000000 --- a/dev-python/flexmock/flexmock-0.10.4.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} pypy3 ) - -inherit distutils-r1 - -DESCRIPTION="Testing library to create mocks, stubs and fakes" -HOMEPAGE="https://flexmock.readthedocs.org/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="amd64 ~riscv" - -distutils_enable_tests pytest - -python_install_all() { - distutils-r1_python_install_all - dodoc -r docs -} diff --git a/dev-python/flexmock/flexmock-0.10.6.ebuild b/dev-python/flexmock/flexmock-0.10.6.ebuild deleted file mode 100644 index 67922e50909b..000000000000 --- a/dev-python/flexmock/flexmock-0.10.6.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..10} pypy3 ) - -inherit distutils-r1 - -DESCRIPTION="Testing library to create mocks, stubs and fakes" -HOMEPAGE="https://flexmock.readthedocs.org/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~riscv" - -distutils_enable_tests pytest - -PATCHES=( - "${FILESDIR}/${P}-fix-with_args-sys.stdout.write.patch" -) - -python_test() { - epytest -p no:flaky -} - -python_install_all() { - distutils-r1_python_install_all - dodoc -r docs -} diff --git a/dev-python/flexmock/flexmock-0.10.8.ebuild b/dev-python/flexmock/flexmock-0.10.8.ebuild deleted file mode 100644 index dd44eb32f8f8..000000000000 --- a/dev-python/flexmock/flexmock-0.10.8.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..10} pypy3 ) - -inherit distutils-r1 - -DESCRIPTION="Testing library to create mocks, stubs and fakes" -HOMEPAGE="https://flexmock.readthedocs.org/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~riscv" - -distutils_enable_tests pytest - -python_test() { - epytest -p no:flaky -} - -python_install_all() { - distutils-r1_python_install_all - dodoc -r docs -} |