commit: cc3e38b6b23c277f7f740dfa483f9dbfe41fd558 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sun Jun 21 18:50:22 2020 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sun Jun 21 19:23:33 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc3e38b6
dev-python/cherrypy: Fix tests Closes: https://bugs.gentoo.org/727240 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> 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(-) diff --git a/dev-python/cherrypy/cherrypy-18.5.0.ebuild b/dev-python/cherrypy/cherrypy-18.5.0.ebuild index 7d90d9a6bf2..23a04475d93 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 d556b867820..00000000000 --- 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')
