From cc3e38b6b23c277f7f740dfa483f9dbfe41fd558 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 21 Jun 2020 20:50:22 +0200 Subject: dev-python/cherrypy: Fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/727240 Signed-off-by: Michał Górny --- dev-python/cherrypy/cherrypy-18.5.0.ebuild | 12 ++++++------ .../cherrypy/files/cherrypy-18.5.0-tests.patch | 21 --------------------- 2 files changed, 6 insertions(+), 27 deletions(-) delete mode 100644 dev-python/cherrypy/files/cherrypy-18.5.0-tests.patch (limited to 'dev-python/cherrypy') diff --git a/dev-python/cherrypy/cherrypy-18.5.0.ebuild b/dev-python/cherrypy/cherrypy-18.5.0.ebuild index 7d90d9a6bf26..23a04475d93c 100644 --- a/dev-python/cherrypy/cherrypy-18.5.0.ebuild +++ b/dev-python/cherrypy/cherrypy-18.5.0.ebuild @@ -25,24 +25,20 @@ RDEPEND=">=dev-python/cheroot-8.2.1[${PYTHON_USEDEP}] dev-python/zc-lockfile[${PYTHON_USEDEP}] dev-python/jaraco-collections[${PYTHON_USEDEP}] ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )" -BDEPEND="${RDEPEND} +BDEPEND=" dev-python/setuptools[${PYTHON_USEDEP}] dev-python/setuptools_scm[${PYTHON_USEDEP}] test? ( + ${RDEPEND} dev-python/routes[${PYTHON_USEDEP}] dev-python/simplejson[${PYTHON_USEDEP}] dev-python/objgraph[${PYTHON_USEDEP}] - dev-python/backports-unittest-mock[${PYTHON_USEDEP}] dev-python/path-py[${PYTHON_USEDEP}] dev-python/requests-toolbelt[${PYTHON_USEDEP}] dev-python/pytest-services[${PYTHON_USEDEP}] ) " -PATCHES=( - "${FILESDIR}/cherrypy-18.5.0-tests.patch" -) - distutils_enable_tests pytest python_prepare_all() { @@ -50,6 +46,10 @@ python_prepare_all() { sed -e 's|@pytest.mark.xfail(py27_on_windows|@pytest.mark.xfail(sys.version_info < (3,)|' \ -i cherrypy/test/test_static.py || die + # fragile, fails with newer versions of CPython + sed -e 's:testCombinedTools:_&:' \ + -i cherrypy/test/test_tools.py || die + sed -r -e '/(pytest-sugar|pytest-cov)/ d' \ -i setup.py || die diff --git a/dev-python/cherrypy/files/cherrypy-18.5.0-tests.patch b/dev-python/cherrypy/files/cherrypy-18.5.0-tests.patch deleted file mode 100644 index d556b8678200..000000000000 --- a/dev-python/cherrypy/files/cherrypy-18.5.0-tests.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/cherrypy/test/test_tools.py b/cherrypy/test/test_tools.py -index 3a0fd389..e357a445 100644 ---- a/cherrypy/test/test_tools.py -+++ b/cherrypy/test/test_tools.py -@@ -9,6 +9,8 @@ import unittest - import operator - from http.client import IncompleteRead - -+import pytest -+ - import cherrypy - from cherrypy import tools - from cherrypy._cpcompat import ntou -@@ -343,6 +345,7 @@ class ToolTests(helper.CPWebCase): - expected_msg = tmpl.format(attr='items') - self.assertInBody(expected_msg) - -+ @pytest.mark.skipif('sys.hexversion >= 0x03080000') - def testCombinedTools(self): - expectedResult = (ntou('Hello,world') + - europoundUnicode).encode('utf-8') -- cgit v1.2.3-65-gdbad