dev-python/pastedeploy: Enable tests
authorMichał Górny <mgorny@gentoo.org>
Tue, 9 May 2017 18:08:10 +0000 (20:08 +0200)
committerMichał Górny <mgorny@gentoo.org>
Tue, 9 May 2017 18:43:16 +0000 (20:43 +0200)
dev-python/pastedeploy/Manifest
dev-python/pastedeploy/files/pastedeploy-1.5.2-py3-tests.patch [new file with mode: 0644]
dev-python/pastedeploy/pastedeploy-1.5.2-r1.ebuild

index 94cc2861890abe38662cac0403877c7a6668866e..e6d5f99dd8cbb2a85e67ba83cae07f538353cf1b 100644 (file)
@@ -1 +1,2 @@
 DIST PasteDeploy-1.5.2.tar.gz 24006 SHA256 d5858f89a255e6294e63ed46b73613c56e3b9a2d82a42f1df4d06c8421a9e3cb SHA512 03147b2e735f4504b928066d35f46e7d19a49b85afc506b793fba69c8827a4d5b8185074bdd4a963ac392cc104f5a608d1db9a3538d7d3239da5febcbff4ccab WHIRLPOOL 0a48c72278c71376f8b4ddc708c1b6c3370b13f66fc3d438d1a485e69d413814ca37cf580d8e09e0d49a8a35f7e6e0104744440a3fe6b1dfeb5914d3a0557793
+DIST pastedeploy-1.5.2-r1.tar.gz 29528 SHA256 041a5d524ceb45b5677e0d7e0d94d01c14dc8bca51d35266497532299d9fa7f0 SHA512 5d9f648d4bddb4fa0b018f5e1c100d0899ff9e6a429a0a54aede69800fa13b7bb0d606ff454c516b36c3b056320bbda4581de9d57a154e71493a8bd6208fb3ce WHIRLPOOL a5938beecf0845e31a97f292fdc4ee49bf6bfd23a349a857c19269355e6f2c1b79cfb5b31ebdc7e29494054b94170cfb511530c054e070eebbf373cfee954bf4
diff --git a/dev-python/pastedeploy/files/pastedeploy-1.5.2-py3-tests.patch b/dev-python/pastedeploy/files/pastedeploy-1.5.2-py3-tests.patch
new file mode 100644 (file)
index 0000000..0839406
--- /dev/null
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User aodag <aodagx@gmail.com>
+# Date 1457425517 -32400
+# Node ID 6aeb907ef222ed071b149f8b07b14f0a61e45dbe
+# Parent  0c2ea2f675bc77f2ee2a889c0e83d61d026fbc7b
+use explicit bytes literal
+
+diff --git a/tests/test_config_middleware.py b/tests/test_config_middleware.py
+--- a/tests/test_config_middleware.py
++++ b/tests/test_config_middleware.py
+@@ -10,7 +10,7 @@
+ 
+ def app_with_exception(environ, start_response):
+     def cont():
+-        yield "something"
++        yield b"something"
+         raise Bug
+     start_response('200 OK', [('Content-type', 'text/html')])
+     return cont()
index b6bdabca097b843017e21fdc80731657a364d4f3..2dd75526e2b7c98bec2997bfce33b57acdf8c9da 100644 (file)
@@ -4,25 +4,35 @@
 EAPI=5
 PYTHON_COMPAT=( python{2_7,3_4,3_5} )
 
-inherit distutils-r1
+inherit distutils-r1 vcs-snapshot
 
 MY_PN="PasteDeploy"
 MY_P="${MY_PN}-${PV}"
 
 DESCRIPTION="Load, configure, and compose WSGI applications and servers"
 HOMEPAGE="http://pythonpaste.org/deploy/ https://pypi.python.org/pypi/PasteDeploy"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+# pypi tarball does not include tests
+SRC_URI="https://bitbucket.org/ianb/pastedeploy/get/${PV}.tar.gz -> ${P}-r1.tar.gz"
 
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
-IUSE="doc"
+IUSE="doc test"
 
 RDEPEND="dev-python/namespace-paste[${PYTHON_USEDEP}]
        dev-python/setuptools[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+       test? ( dev-python/nose[${PYTHON_USEDEP}] )"
 
-S="${WORKDIR}/${MY_P}"
+S=${WORKDIR}/${P}-r1
+
+PATCHES=(
+       "${FILESDIR}"/${P}-py3-tests.patch
+)
+
+python_test() {
+       esetup.py test
+}
 
 python_install_all() {
        distutils-r1_python_install_all