summaryrefslogtreecommitdiff
path: root/dev-python/testtools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/testtools
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/testtools')
-rw-r--r--dev-python/testtools/Manifest4
-rw-r--r--dev-python/testtools/files/testtools-2.3.0-py37.patch44
-rw-r--r--dev-python/testtools/metadata.xml17
-rw-r--r--dev-python/testtools/testtools-2.3.0.ebuild57
4 files changed, 122 insertions, 0 deletions
diff --git a/dev-python/testtools/Manifest b/dev-python/testtools/Manifest
new file mode 100644
index 000000000000..173c507c3f12
--- /dev/null
+++ b/dev-python/testtools/Manifest
@@ -0,0 +1,4 @@
+AUX testtools-2.3.0-py37.patch 1740 BLAKE2B 10a1e774fcc436b1e4f33075f807ab70ec79a7d16338cac35f63dbeaf4ab4f95d5f67c69886918405edb7ef939b9cbae00176202705d08a9f1ea80f08c3c6af1 SHA512 e8a441464b8d6e2a75f95b26e83c2b2fefad262fa193bf088b65c1101fb34a9d53ee7a3554cf005519a44cc007f78df74d32163e5910f447318c2e89e67529d3
+DIST testtools-2.3.0.tar.gz 231559 BLAKE2B 6ae098e368cabc0bfe45736324819687a6086eccf868de7eec312caf7c64b5d75a3168f3966d5cd0b05ad9295957a7aa1ee3c1589f076de1f5cb619b197ba08a SHA512 558fe6a1bdce7215f9f6f178f469a2b76948dc7ff0ce27400482a16683474edb81d9bf90ae48b6fcb8df9eb70759341b694aa162ed3d9d4abd372981cdcd8a64
+EBUILD testtools-2.3.0.ebuild 1524 BLAKE2B 1b8a4d164c97aca82578e44b0facf3146c01e6aac43d41c4d6d95e04c37389cb9f56e78b0b05e0854f50e1a2efa4d7304506ab0fc70612e789ee733333bbdf71 SHA512 c83aaf1d846b3b2e8f0adc9e42cd7f814f0b1cc25d3d94804ab5f2aa289204bd81bfd970a5d10c73a91cd6e48b8384456df8b5d6bf80e704b1ad84190a8fff16
+MISC metadata.xml 554 BLAKE2B 251f32aa81267f470d8f5d1f22bd2e2354fc39ec79ac326dd64333e73e5cc8ab35d6633e1ebce2bad5086d55f838fb129d7cbde2e1d36cf77945527e6e786157 SHA512 ebe5defc73dc62044732463b2d295c08ca24573c34b689150f3865247b34ef6d925437a0c97598c3260ec037c4ed3644017601fd2b7127521c7c352edc1e6384
diff --git a/dev-python/testtools/files/testtools-2.3.0-py37.patch b/dev-python/testtools/files/testtools-2.3.0-py37.patch
new file mode 100644
index 000000000000..0f2da043ffe9
--- /dev/null
+++ b/dev-python/testtools/files/testtools-2.3.0-py37.patch
@@ -0,0 +1,44 @@
+https://github.com/testing-cabal/testtools/commit/29004731f9c480b7c44a9c2605513d50d372898f.patch
+
+From 29004731f9c480b7c44a9c2605513d50d372898f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Thu, 17 May 2018 17:52:26 +0200
+Subject: [PATCH] Fix the tests on Python 3.7
+
+Exception's repr got changed not to include trailing comma
+
+Fixes https://github.com/testing-cabal/testtools/issues/270
+---
+ .travis.yml | 1 +
+ testtools/tests/matchers/test_exception.py | 11 +++++++++--
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/testtools/tests/matchers/test_exception.py b/testtools/tests/matchers/test_exception.py
+index 6cd80af1..acd39252 100644
+--- a/testtools/tests/matchers/test_exception.py
++++ b/testtools/tests/matchers/test_exception.py
+@@ -32,15 +32,22 @@ class TestMatchesExceptionInstanceInterface(TestCase, TestMatchersInterface):
+ matches_matches = [error_foo]
+ matches_mismatches = [error_bar, error_base_foo]
+
++ if sys.version_info >= (3, 7):
++ # exception's repr has changed
++ _e = ''
++ else:
++ _e = ','
++
+ str_examples = [
+- ("MatchesException(Exception('foo',))",
++ ("MatchesException(Exception('foo'%s))" % _e,
+ MatchesException(Exception('foo')))
+ ]
+ describe_examples = [
+ ("%r is not a %r" % (Exception, ValueError),
+ error_base_foo,
+ MatchesException(ValueError("foo"))),
+- ("ValueError('bar',) has different arguments to ValueError('foo',).",
++ ("ValueError('bar'%s) has different arguments to ValueError('foo'%s)."
++ % (_e, _e),
+ error_bar,
+ MatchesException(ValueError("foo"))),
+ ]
diff --git a/dev-python/testtools/metadata.xml b/dev-python/testtools/metadata.xml
new file mode 100644
index 000000000000..d2fbb03bb6cd
--- /dev/null
+++ b/dev-python/testtools/metadata.xml
@@ -0,0 +1,17 @@
+<?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>
+ <maintainer type="project">
+ <email>openstack@gentoo.org</email>
+ <name>Openstack</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">testtools</remote-id>
+ <remote-id type="github">testing-cabal/testtools</remote-id>
+ <remote-id type="launchpad">testtools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/testtools/testtools-2.3.0.ebuild b/dev-python/testtools/testtools-2.3.0.ebuild
new file mode 100644
index 000000000000..e37da41b3e77
--- /dev/null
+++ b/dev-python/testtools/testtools-2.3.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 pypy pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Extensions to the Python standard library unit testing framework"
+HOMEPAGE="https://github.com/testing-cabal/testtools"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc test"
+
+CDEPEND="
+ >=dev-python/extras-1.0.0[${PYTHON_USEDEP}]
+ dev-python/mimeparse[${PYTHON_USEDEP}]
+ >=dev-python/pbr-0.11[${PYTHON_USEDEP}]
+ dev-python/pyrsistent[${PYTHON_USEDEP}]
+ >=dev-python/six-1.4.0[${PYTHON_USEDEP}]
+ dev-python/traceback2[${PYTHON_USEDEP}]
+ >=dev-python/unittest2-1.0.0[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ${CDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? (
+ >=dev-python/fixtures-1.3.0[${PYTHON_USEDEP}]
+ dev-python/testscenarios[${PYTHON_USEDEP}]
+ )
+"
+RDEPEND="${CDEPEND}"
+PDEPEND=">=dev-python/fixtures-1.3.0[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}"/testtools-2.3.0-py37.patch
+)
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+python_test() {
+ "${PYTHON}" -m testtools.run testtools.tests.test_suite || die "tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && HTML_DOCS=( doc/_build/html/. )
+
+ distutils-r1_python_install_all
+}