diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/mocker | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/mocker')
-rw-r--r-- | dev-python/mocker/Manifest | 4 | ||||
-rw-r--r-- | dev-python/mocker/files/mocker-1.1.1-pypy_test.patch | 29 | ||||
-rw-r--r-- | dev-python/mocker/metadata.xml | 11 | ||||
-rw-r--r-- | dev-python/mocker/mocker-1.1.1-r1.ebuild | 25 |
4 files changed, 69 insertions, 0 deletions
diff --git a/dev-python/mocker/Manifest b/dev-python/mocker/Manifest new file mode 100644 index 000000000000..af995ee308a4 --- /dev/null +++ b/dev-python/mocker/Manifest @@ -0,0 +1,4 @@ +AUX mocker-1.1.1-pypy_test.patch 1380 BLAKE2B 69033e748aad85160008c4d0b55017771dcba69f711f6027532a342b5fdca68d28dd27ce0c52a4a33e6818d4c278c303ebe3aca58f60f58247910fbfe70e8008 SHA512 cbbda1c8903658332f7a391c7be547d62d64c5b149c2d92434558415dafc0c68686d5210ba814ba5edb42987f04e51cb8e5ee10e3a31684560a0856f9aba81c0 +DIST mocker-1.1.1.tar.bz2 36357 BLAKE2B b64243d7846cf9cf14e1737b148786ad13d2406f69222a33fa6f9e9031b0a42e94a76303c9751389c103c7350362adf6510b2b718fbedff9d879c7cf78c9dd72 SHA512 79fc08220b932f5e8ec4999a872fd522a71e2d193fb7842a60b164793863d97aefbd5b16469243c323b8ee151a33e1ea18703b7ceaa239c816bc09a3fb7f6825 +EBUILD mocker-1.1.1-r1.ebuild 666 BLAKE2B b59cf8080a3f5a68f2cc9e5d173a651d465ce5092cefad4d9fa205ce24253787b2373575833d40799093ae6e67cd138be402d2c043428e0dfe32762c57257ef6 SHA512 0cad92316631a6aa2a6c1a0d6400ab83e4f57b007951ac15acb3263c3bf741df18a098c77b5850f30d81889b3531eabe504b3b122f510d70f9959d154391e93d +MISC metadata.xml 319 BLAKE2B a16e091a540578adaf5c1d7b17ada9b872ab67abf646dfb602bd3f53b70129525d8d7404120b7991183c3bab98049deb12e398365a89a807ba7d40f46248c579 SHA512 e5b4c5a742d74593e9bb504b3ec84dec33f96dfd414eecacfeb1b28542018b54979ec971259e8aeb193fb2a11acaac25d461684f75eb6832f4aba26739f1a8e9 diff --git a/dev-python/mocker/files/mocker-1.1.1-pypy_test.patch b/dev-python/mocker/files/mocker-1.1.1-pypy_test.patch new file mode 100644 index 000000000000..b0036ad6dd11 --- /dev/null +++ b/dev-python/mocker/files/mocker-1.1.1-pypy_test.patch @@ -0,0 +1,29 @@ +Upstream maintainer assures us "The "assertRaises" line should be skipped IMO. The next call actually succeeds, +but of course there is no point to test for unsupported functions." +Re the 2nd patch; +PyPy actually behaves as if __slots__ was added to the class +see http://morepypy.blogspot.ch/2010/11/efficiently-implementing-python-objects.html +diff -ur mocker-1.1.1.orig/test.py mocker-1.1.1/test.py +--- test.py 2012-05-19 19:27:02.000000000 +0800 ++++ test.py 2012-07-11 14:43:57.848953730 +0800 +@@ -3880,7 +3881,7 @@ + from zlib import adler32 + # If that fails, this test has to change because either adler32 has + # changed, or the implementation of getargspec has changed. +- self.assertRaises(TypeError, inspect.getargspec, adler32) ++ # self.assertRaises(TypeError, inspect.getargspec, adler32) + try: + task = SpecChecker(adler32) + task.run(self.path("asd")) +@@ -4060,7 +4060,8 @@ + self.calendar = calendar + obj = C() + self.task.replay() +- self.assertEquals(type(obj.calendar), Mock) +- self.assertTrue(obj.calendar is self.mock) ++ if not hasattr(sys, 'pypy_version_info'): ++ self.assertEquals(type(obj.calendar), Mock) ++ self.assertTrue(obj.calendar is self.mock) + + def test_install_on_submodule(self): + from os import path diff --git a/dev-python/mocker/metadata.xml b/dev-python/mocker/metadata.xml new file mode 100644 index 000000000000..b523b23fd348 --- /dev/null +++ b/dev-python/mocker/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <upstream> + <remote-id type="pypi">mocker</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/mocker/mocker-1.1.1-r1.ebuild b/dev-python/mocker/mocker-1.1.1-r1.ebuild new file mode 100644 index 000000000000..8ffc410daae4 --- /dev/null +++ b/dev-python/mocker/mocker-1.1.1-r1.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 pypy ) + +inherit distutils-r1 + +DESCRIPTION="Platform for Python test doubles: mocks, stubs, fakes, and dummies" +HOMEPAGE="http://labix.org/mocker https://pypi.org/project/mocker/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ppc64 x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" +IUSE="" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +RDEPEND="" + +PATCHES=( "${FILESDIR}"/${P}-pypy_test.patch ) + +python_test() { + "${PYTHON}" test.py || die "Tests failed under ${EPYTHON}" +} |