summaryrefslogtreecommitdiff
path: root/dev-python/testtools
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/testtools')
-rw-r--r--dev-python/testtools/Manifest10
-rw-r--r--dev-python/testtools/files/testtools-1.8.0-twisted-backport.patch74
-rw-r--r--dev-python/testtools/files/testtools-1.8.0-twisted-backport1.patch33
-rw-r--r--dev-python/testtools/files/testtools-1.8.0-twisted-backport2.patch57
-rw-r--r--dev-python/testtools/files/testtools-2.3.0-py37.patch44
-rw-r--r--dev-python/testtools/testtools-0.9.36.ebuild50
-rw-r--r--dev-python/testtools/testtools-1.8.0.ebuild52
-rw-r--r--dev-python/testtools/testtools-2.3.0.ebuild6
8 files changed, 51 insertions, 275 deletions
diff --git a/dev-python/testtools/Manifest b/dev-python/testtools/Manifest
index 2d346b039e1e..173c507c3f12 100644
--- a/dev-python/testtools/Manifest
+++ b/dev-python/testtools/Manifest
@@ -1,10 +1,4 @@
-AUX testtools-1.8.0-twisted-backport.patch 3154 BLAKE2B abe8ebf88b56052624d8dd743e873fe6b8d1287b79f3de76d8ad6db036e2bcc43d7e98c4067252f271dfa52142eda0cc4f7cfcb8260c1c9b123b7887cb790571 SHA512 a21e6cfdc50620f783ae9825cc7e7deee875becd7b297b8d47cf217668330fe5a0ee4eca24d56c0fea3da020828112f0a48ae78b2c74de5b60d39325197d3c74
-AUX testtools-1.8.0-twisted-backport1.patch 907 BLAKE2B f80d4e68ab7d360d23797926c629d965b901a13a11395fc3bb3d5300bf73225cad6ac27e53366a47f87123e8ee10e2ca6bea4230e390d94633d9c7f3967f6274 SHA512 c1725914d9748234b705eb70b480288433248a009400403e207148fecd11660700d7edc679d4c432b48980838c17ab89a55c7b5b0eef594a0795d3b5174ebac3
-AUX testtools-1.8.0-twisted-backport2.patch 1620 BLAKE2B e2c50007c7e973a534054a07fee8540bb038b74f079bf45bb548c9e44f8844636f7905b7aeafdcc94ba6d34fd0ae203bb1dad9c15662b2299a8b159f58a5e99d SHA512 d8a1613c04fbe7447ebf9d2750e0c28be3909071ccaa31f28c8acc8df957f23c2b98ada71684a30c2459fc10dc60b7d15b89ae4dead31bf240db86eca36fcd18
-DIST testtools-0.9.36.tar.gz 201717 BLAKE2B 3acfc2b3a821919728670868a44356e93536a1d9530b396d5964a44879246d825358f5abe03041679ab8a48b90670757895c32a5ea47bdc6752c20f1ce83e075 SHA512 1cb29deb2fb7cd0eebd9affb06e877487989163d0c4452db8051d75b936b0c4ac6443649d52f83cd3695421b361af7dc75507b037528ac0f7cfde9b4b201ad08
-DIST testtools-1.8.0.tar.gz 207976 BLAKE2B eaa651436f289710f84910ac8229f8635db4e7129f58495a2efeea4f944befaf93f05992f5d666108845db5d4079ee55e371be5c3f5b403ad56998053c601b5d SHA512 b5f0201222d1e8c60fb7c2793bcd38e1c96c6f9fae99e9f3e784d17230c9abbf7325053d501c07e752bad2da36b49e2c79a25d0c20cb9a2f426057f839a77b3a
+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-0.9.36.ebuild 1393 BLAKE2B 5a1b0c2958ee8d7980d6386fda6dd887a36578d65ac3c2e6c1be1f193648b9cb0e23c516a88b6e9860804a6c705c5c23ce9ff5905712b2c1db3a0e1677a9c976 SHA512 f0280ab7d15953909a15c036337de9e407ea06118f4a9f1070afca09060a81175972213aeda2d1c9fb8bdde7a973ac080858f6e4c35477b1791dd544109413fd
-EBUILD testtools-1.8.0.ebuild 1347 BLAKE2B c7e33b2ccbaf141df6c9174fe48a4a120eea37de0756222af51acecde1de89e3ae57cdbd0e7672d61d1f47739114e47f4f2b8fdfacd9a476798a8f26db5392d2 SHA512 5055702fde3ba89117d7d5fe872cf77c0e2bbdd48a17c397df7048ba4228be219f950b5583ceb21be38aaa9fab3cb09925dc55e3e82637ce6db560d1bd4388f6
-EBUILD testtools-2.3.0.ebuild 1469 BLAKE2B 18d460db7b3b06f0a4811a60f11a8ea26aa78172af0c2621c7359f545d7a3b4fded8cdbb36e338a9ce3df55d63c641f7b6c712fb2da6e7c3341fb4c9aa9dec2b SHA512 37b1ae1a7cf12b0d7ed92f908e9786a2f61eeac2ef52c923db3b07a12a11bae2587b47badd0b0eb0e88dd54d7cab976f38e9029d45093868dab9635f8019bf8d
+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-1.8.0-twisted-backport.patch b/dev-python/testtools/files/testtools-1.8.0-twisted-backport.patch
deleted file mode 100644
index fd65b4cd6f53..000000000000
--- a/dev-python/testtools/files/testtools-1.8.0-twisted-backport.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 25f4800d62f339f81b09c894275a3af4b284fb62 Mon Sep 17 00:00:00 2001
-From: Colin Watson <cjwatson@canonical.com>
-Date: Wed, 19 Aug 2015 03:06:09 +0100
-Subject: [PATCH] Port twisted.deferredruntest to Twisted >= 15.1.0
-
-Twisted 15.1.0 removes the compatibility import of _LogObserver in
-twisted.trial.unittest. This is unfortunate for us, but it's what we
-get for using an internal interface. It at least still exists in
-twisted.trial._synctest, so we can get it from there.
-
-Twisted 15.2.0 adds the new twisted.logger framework, which requires a
-slight adjustment to run_with_log_observers. There's no longer a
-supported interface to get hold of all log observers, but since we're
-already using an internal interface (see above), what's one more?
-
-This passes "make check" with the current release, Twisted 15.3.0.
----
- testtools/deferredruntest.py | 27 +++++++++++++++++++++++----
- 1 file changed, 23 insertions(+), 4 deletions(-)
-
-diff --git a/testtools/deferredruntest.py b/testtools/deferredruntest.py
-index c33e14a..04cdb0f 100644
---- a/testtools/deferredruntest.py
-+++ b/testtools/deferredruntest.py
-@@ -27,8 +27,15 @@
- )
-
- from twisted.internet import defer
-+try:
-+ from twisted.logger import globalLogPublisher
-+except ImportError:
-+ globalLogPublisher = None
- from twisted.python import log
--from twisted.trial.unittest import _LogObserver
-+try:
-+ from twisted.trial.unittest import _LogObserver
-+except ImportError:
-+ from twisted.trial._synctest import _LogObserver
-
-
- class _DeferredRunTest(RunTest):
-@@ -53,9 +60,21 @@ def _run_user(self, function, *args):
-
- def run_with_log_observers(observers, function, *args, **kwargs):
- """Run 'function' with the given Twisted log observers."""
-- real_observers = list(log.theLogPublisher.observers)
-+ if globalLogPublisher is not None:
-+ # Twisted >= 15.2.0, with the new twisted.logger framework.
-+ # log.theLogPublisher.observers will only contain legacy observers;
-+ # we need to look at globalLogPublisher._observers, which contains
-+ # both legacy and modern observers, and add and remove them via
-+ # globalLogPublisher. However, we must still add and remove the
-+ # observers we want to run with via log.theLogPublisher, because
-+ # _LogObserver may consider old keys and require them to be mapped.
-+ publisher = globalLogPublisher
-+ real_observers = list(publisher._observers)
-+ else:
-+ publisher = log.theLogPublisher
-+ real_observers = list(publisher.observers)
- for observer in real_observers:
-- log.theLogPublisher.removeObserver(observer)
-+ publisher.removeObserver(observer)
- for observer in observers:
- log.theLogPublisher.addObserver(observer)
- try:
-@@ -64,7 +83,7 @@ def run_with_log_observers(observers, function, *args, **kwargs):
- for observer in observers:
- log.theLogPublisher.removeObserver(observer)
- for observer in real_observers:
-- log.theLogPublisher.addObserver(observer)
-+ publisher.addObserver(observer)
-
-
- # Observer of the Twisted log that we install during tests.
diff --git a/dev-python/testtools/files/testtools-1.8.0-twisted-backport1.patch b/dev-python/testtools/files/testtools-1.8.0-twisted-backport1.patch
deleted file mode 100644
index c1eb11b1f5ab..000000000000
--- a/dev-python/testtools/files/testtools-1.8.0-twisted-backport1.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 6d821b5770b01f5ec98c3b8db734fffeebf12b62 Mon Sep 17 00:00:00 2001
-From: Colin Watson <cjwatson@canonical.com>
-Date: Mon, 24 Aug 2015 13:21:57 +0100
-Subject: [PATCH] Test with Twisted 13.0.0/15.2.0.
-
----
- .travis.yml | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/.travis.yml b/.travis.yml
-index 41036f8..a706b27 100644
---- a/.travis.yml
-+++ b/.travis.yml
-@@ -7,6 +7,10 @@ python:
- - "3.4"
- - "pypy"
-
-+env:
-+ - TWISTED="==13.0.0"
-+ - TWISTED="==15.2.0"
-+
- # We have to pin Jinja2 < 2.7 for Python 3.2 because 2.7 drops/breaks support:
- # http://jinja.pocoo.org/docs/changelog/#version-2-7
- # And Spinx to < 1.3 for pypy3 and python 3.2 similarly.
-@@ -23,7 +27,7 @@ matrix:
- env: SPHINX="<1.3"
-
- install:
-- - pip install fixtures $JINJA_REQ sphinx$SPHINX
-+ - pip install fixtures $JINJA_REQ sphinx$SPHINX Twisted$TWISTED
- - python setup.py install
-
- script:
diff --git a/dev-python/testtools/files/testtools-1.8.0-twisted-backport2.patch b/dev-python/testtools/files/testtools-1.8.0-twisted-backport2.patch
deleted file mode 100644
index df5d91f9b681..000000000000
--- a/dev-python/testtools/files/testtools-1.8.0-twisted-backport2.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 2e03ffaff15bc5d83c5f6d092aab4072f166aca0 Mon Sep 17 00:00:00 2001
-From: Colin Watson <cjwatson@canonical.com>
-Date: Mon, 24 Aug 2015 13:45:01 +0100
-Subject: [PATCH] Only run Twisted tests on Python 2.
-
----
- .travis.yml | 22 ++++++++++++++++------
- 1 file changed, 16 insertions(+), 6 deletions(-)
-
-diff --git a/.travis.yml b/.travis.yml
-index a706b27..bc007f2 100644
---- a/.travis.yml
-+++ b/.travis.yml
-@@ -7,27 +7,37 @@ python:
- - "3.4"
- - "pypy"
-
--env:
-- - TWISTED="==13.0.0"
-- - TWISTED="==15.2.0"
--
- # We have to pin Jinja2 < 2.7 for Python 3.2 because 2.7 drops/breaks support:
- # http://jinja.pocoo.org/docs/changelog/#version-2-7
--# And Spinx to < 1.3 for pypy3 and python 3.2 similarly.
-+# And Sphinx to < 1.3 for pypy3 and python 3.2 similarly.
- #
- # See also:
- # http://stackoverflow.com/questions/18252804/syntax-error-in-jinja-2-library
-+#
-+# Twisted tests currently only work on Python 2.
- matrix:
- include:
-+ - python: "2.6"
-+ env:
-+ - TWISTED_REQ="Twisted==13.0.0"
-+ - TWISTED_REQ="Twisted==15.2.0"
-+ - python: "2.7"
-+ env:
-+ - TWISTED_REQ="Twisted==13.0.0"
-+ - TWISTED_REQ="Twisted==15.2.0"
- - python: "3.2"
- env:
- - JINJA_REQ="jinja2<2.7, Pygments<2.0"
- - SPHINX="<1.3"
-+ - python: "pypy"
-+ env:
-+ - TWISTED_REQ="Twisted==13.0.0"
-+ - TWISTED_REQ="Twisted==15.2.0"
- - python: "pypy3"
- env: SPHINX="<1.3"
-
- install:
-- - pip install fixtures $JINJA_REQ sphinx$SPHINX Twisted$TWISTED
-+ - pip install fixtures $JINJA_REQ sphinx$SPHINX $TWISTED_REQ
- - python setup.py install
-
- script:
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/testtools-0.9.36.ebuild b/dev-python/testtools/testtools-0.9.36.ebuild
deleted file mode 100644
index 3c816291c9e1..000000000000
--- a/dev-python/testtools/testtools-0.9.36.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 versionator
-
-#SERIES="$(get_version_component_range 1-2)"
-SERIES="trunk"
-
-DESCRIPTION="Extensions to the Python unittest library"
-HOMEPAGE="https://launchpad.net/testtools https://pypi.org/project/testtools/"
-SRC_URI="https://launchpad.net/${PN}/${SERIES}/${PV}/+download/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="doc test"
-
-RDEPEND="dev-python/mimeparse[${PYTHON_USEDEP}]
- dev-python/extras[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
- test? ( $(python_gen_cond_dep 'dev-python/twisted-core[${PYTHON_USEDEP}]' python2_7) )"
-
-python_compile_all() {
- use doc && emake -C doc html
-}
-
-python_prepare_all() {
- # Take out failing tests
- # https://bugs.launchpad.net/testtools/+bug/1380918
- sed -e 's:test_test_module:_&:' -e 's:test_test_suite:_&:' \
- -i testtools/tests/test_distutilscmd.py || die
-
- distutils-r1_python_prepare_all
-}
-
-python_test() {
- esetup.py test
-}
-
-python_install_all() {
- use doc && HTML_DOCS=( doc/_build/html/. )
- distutils-r1_python_install_all
-}
diff --git a/dev-python/testtools/testtools-1.8.0.ebuild b/dev-python/testtools/testtools-1.8.0.ebuild
deleted file mode 100644
index 33c0a7d8f7e6..000000000000
--- a/dev-python/testtools/testtools-1.8.0.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,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[${PYTHON_USEDEP}]
- dev-python/mimeparse[${PYTHON_USEDEP}]
- >=dev-python/pbr-0.11[${PYTHON_USEDEP}]
- >=dev-python/unittest2-1.0.0[${PYTHON_USEDEP}]
- dev-python/traceback2[${PYTHON_USEDEP}]
-"
-DEPEND="
- dev-python/setuptools[${PYTHON_USEDEP}]
- ${CDEPEND}
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
-"
-RDEPEND="${CDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/${P}-twisted-backport.patch
- "${FILESDIR}"/${P}-twisted-backport1.patch
- "${FILESDIR}"/${P}-twisted-backport2.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
-}
diff --git a/dev-python/testtools/testtools-2.3.0.ebuild b/dev-python/testtools/testtools-2.3.0.ebuild
index 0ec501a3f0e0..e37da41b3e77 100644
--- a/dev-python/testtools/testtools-2.3.0.ebuild
+++ b/dev-python/testtools/testtools-2.3.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -38,6 +38,10 @@ DEPEND="
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
}