summaryrefslogtreecommitdiff
path: root/dev-python/mocker
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/mocker
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/mocker')
-rw-r--r--dev-python/mocker/Manifest6
-rw-r--r--dev-python/mocker/files/mocker-1.1.1-pypy_test.patch29
-rw-r--r--dev-python/mocker/metadata.xml11
-rw-r--r--dev-python/mocker/mocker-1.1.1-r1.ebuild25
4 files changed, 71 insertions, 0 deletions
diff --git a/dev-python/mocker/Manifest b/dev-python/mocker/Manifest
new file mode 100644
index 000000000000..47ddf3788a2e
--- /dev/null
+++ b/dev-python/mocker/Manifest
@@ -0,0 +1,6 @@
+AUX mocker-1.1.1-pypy_test.patch 1380 SHA256 432470af0be4b86cfb01b8baf96cc617fcc043950f45274b467a5df43771852d SHA512 cbbda1c8903658332f7a391c7be547d62d64c5b149c2d92434558415dafc0c68686d5210ba814ba5edb42987f04e51cb8e5ee10e3a31684560a0856f9aba81c0 WHIRLPOOL aaf9e74486a4dc6cf3cc63a6a7d7d226f794e67b0ab64ba8bc6ca8aa67a792dd8c9b42b1e10d17d670133b7af64ad6cbc83d727fe3b362bd4fa7855391a6a29e
+DIST mocker-1.1.1.tar.bz2 36357 SHA256 2009911707c74b28bdc9959b5224717e45fcb93475b4b7bb4efad3285fcf2919 SHA512 79fc08220b932f5e8ec4999a872fd522a71e2d193fb7842a60b164793863d97aefbd5b16469243c323b8ee151a33e1ea18703b7ceaa239c816bc09a3fb7f6825 WHIRLPOOL 29103b97a278575a424ff46f986459d93751a2865fb1eecfa37134053dfdd03e0998f280b44c43d9c9bd4044b7121b20c191e7dc1989790d774eda653f731619
+EBUILD mocker-1.1.1-r1.ebuild 669 SHA256 b26038b47c570023f006fad44b85e1dd830ac0f0cadc272d85dca3d67a236fd8 SHA512 d3811d6b6650deeea98f94499dfca47c6f8a8e6642a301851f7269c365e7b674a1dd93a706d781cfb46fa92bc289a6915305f430afc4c243e33d83a3a2ad672c WHIRLPOOL 4b9b8232fbe3126479a6704a59f34c2fac6b877ae51de2de71f09cca906060e4c92eba65a913cfce863b844b52fe8a806770bee3580726315ce74de4173c28d4
+MISC ChangeLog 2614 SHA256 4393200e76bda1cfdd820b5ca38b14a4d27f5f162330aa9794f97475a391c6c1 SHA512 771edd53e5dc7ce4fe01acf9fa4d012abb6da6ffa8709f34e9f2f9693fe83b84850367ee1480f9e5b1543b808d050829bbd20327e066fee28bb7ce9eae88c384 WHIRLPOOL e703048a1dd028bea81e42e15435fd6d6d16e567dafbd5f4b810f506d53b9e378ae7fd5b83ae3158bbe2ba6ce555eeb6ab2355bfafa3a7d3deca5ac3ed6d224a
+MISC ChangeLog-2015 2418 SHA256 4b859f6e6671bb566e173b7b89942f9c4d388f485751b4610615a10cb0e84c1b SHA512 1962f94a2b888f87b23d908112fcd8674794df5e780c73edda6a35388ec5b6374e59eeb91e17d70823c69647db473486e4f9d27148c1d23d6650e4f66607aea6 WHIRLPOOL 8f1b97efbbecc9593cf384ce7e57059b0a47fa7d29a0df6f12822a546ad5b8f6e116751270a54c03dbd84c631d6f5776e307f4c6fd087a93c832effeb1db2efa
+MISC metadata.xml 319 SHA256 b2f7bddd4be11a25163cd328219b3a107b025605b89571072496bcd2fc8b6576 SHA512 e5b4c5a742d74593e9bb504b3ec84dec33f96dfd414eecacfeb1b28542018b54979ec971259e8aeb193fb2a11acaac25d461684f75eb6832f4aba26739f1a8e9 WHIRLPOOL 411ff6e34a2b9cf801fba87ecb64a06c1b27468d563745aac1e2cd5d69c08a47338f6bba5a18fee0a880da6b6468b2849541c40beabf47c2a81c6d4809b2f8b4
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..634d1f874b72
--- /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.python.org/pypi/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}"
+}