From a7e92a62528e85ad1bf3eafc8c824aa0ce066386 Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Wed, 8 Feb 2023 00:17:57 -0500 Subject: dev-python/*: WIP tests Signed-off-by: Julien Roy --- dev-python/btrees/btrees-4.11.3.ebuild | 12 ++++---- dev-python/persistent/persistent-5.0.ebuild | 26 ++++++++---------- .../repoze-sphinx-autointerface-1.0.0.ebuild | 11 ++++---- dev-python/splinter/splinter-0.19.0.ebuild | 16 +++++++---- dev-python/zdaemon/zdaemon-4.4.ebuild | 10 +++++-- dev-python/zodb/zodb-5.8.0.ebuild | 23 ++++------------ dev-python/zodbpickle/zodbpickle-2.6.ebuild | 7 ++++- .../zope-annotation/zope-annotation-4.8.ebuild | 11 ++++---- .../zope-app-appsetup-4.2.0.ebuild | 10 +++++-- dev-python/zope-app-http/zope-app-http-5.0.ebuild | 11 ++++---- .../zope-app-publication-4.5.ebuild | 11 ++++---- dev-python/zope-app-wsgi/zope-app-wsgi-5.0.ebuild | 10 +++++-- .../zope-applicationcontrol-4.3.ebuild | 11 ++++---- .../zope-authentication-5.0.ebuild | 11 ++++---- .../zope-browsermenu/zope-browsermenu-4.4.ebuild | 11 ++++---- .../zope-browserpage/zope-browserpage-5.0.ebuild | 11 ++++---- .../zope-browserresource-4.4.ebuild | 11 ++++---- .../zope-componentvocabulary-2.3.0.ebuild | 11 ++++---- .../zope-container/zope-container-5.0.ebuild | 10 +++++-- .../zope-contenttype/zope-contenttype-4.6.ebuild | 6 ++-- dev-python/zope-copy/zope-copy-4.3.ebuild | 9 +++--- .../zope-datetime/zope-datetime-4.3.0.ebuild | 11 ++++---- .../zope-deferredimport-4.4.ebuild | 5 ++-- .../zope-deprecation/zope-deprecation-4.4.0.ebuild | 9 +++--- .../zope-dottedname/zope-dottedname-5.0.ebuild | 9 +++--- .../zope-dublincore/zope-dublincore-4.3.0.ebuild | 11 ++++---- dev-python/zope-error/zope-error-4.6.ebuild | 11 ++++---- .../zope-filerepresentation-6.0.ebuild | 9 +++--- dev-python/zope-i18n/zope-i18n-4.9.0.ebuild | 9 +++--- .../zope-lifecycleevent-4.4.ebuild | 9 +++--- dev-python/zope-location/zope-location-4.3.ebuild | 9 +++--- dev-python/zope-login/zope-login-2.2.ebuild | 11 ++++---- dev-python/zope-minmax/zope-minmax-2.3.ebuild | 11 ++++---- .../zope-pagetemplate-4.6.0.ebuild | 11 ++++---- dev-python/zope-password/zope-password-4.4.ebuild | 11 ++++---- .../zope-principalregistry-4.3.ebuild | 11 ++++---- .../zope-processlifetime-2.4.ebuild | 11 ++++---- dev-python/zope-proxy/zope-proxy-5.0.0.ebuild | 32 ++++++++-------------- .../zope-publisher/zope-publisher-6.1.0.ebuild | 6 ++-- dev-python/zope-security/zope-security-6.1.ebuild | 9 +++--- .../zope-securitypolicy-4.3.2.ebuild | 11 ++++---- dev-python/zope-session/zope-session-4.5.ebuild | 11 ++++---- dev-python/zope-site/zope-site-4.6.1.ebuild | 11 ++++---- dev-python/zope-size/zope-size-4.4.ebuild | 11 ++++---- dev-python/zope-tal/zope-tal-5.0.1.ebuild | 11 ++++---- dev-python/zope-tales/zope-tales-5.2.ebuild | 11 ++++---- .../zope-testbrowser/zope-testbrowser-5.6.1.ebuild | 10 +++++-- .../zope-traversing/zope-traversing-4.4.1.ebuild | 11 ++++---- .../zope-untrustedpython-5.0.ebuild | 15 ++++++---- 49 files changed, 270 insertions(+), 286 deletions(-) (limited to 'dev-python') diff --git a/dev-python/btrees/btrees-4.11.3.ebuild b/dev-python/btrees/btrees-4.11.3.ebuild index b03f073..44e5727 100644 --- a/dev-python/btrees/btrees-4.11.3.ebuild +++ b/dev-python/btrees/btrees-4.11.3.ebuild @@ -16,8 +16,6 @@ S="${WORKDIR}/BTrees-${PV}" LICENSE="ZPL" SLOT="0" KEYWORDS="~amd64" -# Zope Testrunner -RESTRICT="test" RDEPEND=" dev-python/persistent[${PYTHON_USEDEP}] @@ -34,7 +32,7 @@ RDEPEND=" DEPEND="${RDEPEND}" distutils_enable_sphinx docs -distutils_enable_tests unittest +distutils_enable_tests setup.py python_compile_all() { # Create Zope Namespace @@ -45,7 +43,7 @@ python_compile_all() { rm "${BUILD_DIR}/install$(python_get_sitedir)/zope/__init__.py" } -# src_test(){ -# cd "${S}/src/BTrees" || die -# distutils-r1_src_test -# } +python_test() { + zope-testrunner -pvc -j "$(nproc)" --usecompiled \ + --path "${BUILD_DIR}/install$(python_get_sitedir)/BTrees" || die +} diff --git a/dev-python/persistent/persistent-5.0.ebuild b/dev-python/persistent/persistent-5.0.ebuild index f3f32d7..6cd2ea8 100644 --- a/dev-python/persistent/persistent-5.0.ebuild +++ b/dev-python/persistent/persistent-5.0.ebuild @@ -15,8 +15,6 @@ SRC_URI="https://github.com/zopefoundation/persistent/archive/${PV}.tar.gz -> ${ LICENSE="ZPL" SLOT="0" KEYWORDS="~amd64" -# Zope Testrunner -RESTRICT="test" RDEPEND=" dev-python/cffi[${PYTHON_USEDEP}] @@ -30,17 +28,17 @@ RDEPEND=" DEPEND="${RDEPEND}" distutils_enable_sphinx docs -distutils_enable_tests unittest +distutils_enable_tests setup.py src_unpack() { default - # Fix broken test - sed -i -e 's/from \.\./from persistent/' "${S}/src/persistent/tests/test_ring.py" || die - # Disable tests that fail - sed -z -i -e "s/def test__p_repr_exception.*_p_repr failed')>\")//g" \ - "${S}/src/persistent/tests/test_persistence.py" || die - sed -z -i -e "s/def test__p_repr_in_instance_ignored.*repr(p)//g" \ - "${S}/src/persistent/tests/test_persistence.py" || die + # # Fix broken test + # sed -i -e 's/from \.\./from persistent/' "${S}/src/persistent/tests/test_ring.py" || die + # # Disable tests that fail + # sed -z -i -e "s/def test__p_repr_exception.*_p_repr failed')>\")//g" \ + # "${S}/src/persistent/tests/test_persistence.py" || die + # sed -z -i -e "s/def test__p_repr_in_instance_ignored.*repr(p)//g" \ + # "${S}/src/persistent/tests/test_persistence.py" || die } python_compile_all() { @@ -52,7 +50,7 @@ python_compile_all() { rm "${BUILD_DIR}/install$(python_get_sitedir)/zope/__init__.py" } -# src_test() { -# cd "${S}/src/persistent" || die -# distutils-r1_src_test -# } +python_test() { + zope-testrunner -pvc -j "$(nproc)" --usecompiled \ + --path "${BUILD_DIR}/install$(python_get_sitedir)/${PN}" || die +} diff --git a/dev-python/repoze-sphinx-autointerface/repoze-sphinx-autointerface-1.0.0.ebuild b/dev-python/repoze-sphinx-autointerface/repoze-sphinx-autointerface-1.0.0.ebuild index bfcfafa..368934d 100644 --- a/dev-python/repoze-sphinx-autointerface/repoze-sphinx-autointerface-1.0.0.ebuild +++ b/dev-python/repoze-sphinx-autointerface/repoze-sphinx-autointerface-1.0.0.ebuild @@ -16,8 +16,6 @@ S="${WORKDIR}/repoze.sphinx.autointerface-${PV}" LICENSE="BSD-with-disclosure" SLOT="0" KEYWORDS="~amd64" -# Zope Testrunner -RESTRICT="test" RDEPEND=" dev-python/zope-interface[${PYTHON_USEDEP}] @@ -27,7 +25,8 @@ DEPEND="${RDEPEND}" distutils_enable_tests setup.py -# python_test() { -# zope-testrunner -pvcD --usecompiled \ -# --path="${BUILD_DIR}/install$(python_get_sitedir)/" || die -# } +python_test() { + distutils_write_namespace zope + zope-testrunner -pvc -j "$(nproc)" --usecompiled \ + --path "${BUILD_DIR}/install$(python_get_sitedir)/zope" || die +} diff --git a/dev-python/splinter/splinter-0.19.0.ebuild b/dev-python/splinter/splinter-0.19.0.ebuild index 000f34a..02d8338 100644 --- a/dev-python/splinter/splinter-0.19.0.ebuild +++ b/dev-python/splinter/splinter-0.19.0.ebuild @@ -17,14 +17,18 @@ SLOT="0" KEYWORDS="~amd64" RDEPEND=" + dev-python/cssselect[${PYTHON_USEDEP}] + dev-python/django[${PYTHON_USEDEP}] + dev-python/flask[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] dev-python/urllib3[${PYTHON_USEDEP}] + dev-python/selenium[${PYTHON_USEDEP}] + dev-python/zope-testbrowser[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] ) test? ( - dev-python/cssselect[${PYTHON_USEDEP}] - dev-python/django[${PYTHON_USEDEP}] - dev-python/flask[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/selenium[${PYTHON_USEDEP}] - dev-python/zope-testbrowser[${PYTHON_USEDEP}] + dev-python/argparse + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] ) " DEPEND="${RDEPEND}" diff --git a/dev-python/zdaemon/zdaemon-4.4.ebuild b/dev-python/zdaemon/zdaemon-4.4.ebuild index 48db6d0..1d2f6d9 100644 --- a/dev-python/zdaemon/zdaemon-4.4.ebuild +++ b/dev-python/zdaemon/zdaemon-4.4.ebuild @@ -15,18 +15,22 @@ SRC_URI="https://github.com/zopefoundation/zdaemon/archive/${PV}.tar.gz -> ${P}. LICENSE="ZPL" SLOT="0" KEYWORDS="~amd64" -# Zope Testrunner -RESTRICT="test" RDEPEND=" dev-python/zconfig[${PYTHON_USEDEP}] test? ( dev-python/manuel[${PYTHON_USEDEP}] dev-python/mock[${PYTHON_USEDEP}] + dev-python/zc-customdoctests dev-python/zope-testing[${PYTHON_USEDEP}] dev-python/zope-testrunner[${PYTHON_USEDEP}] ) " DEPEND="${RDEPEND}" -distutils_enable_tests unittest +distutils_enable_tests setup.py + +python_test() { + zope-testrunner -pvc -j "$(nproc)" --usecompiled \ + --path "${BUILD_DIR}/install$(python_get_sitedir)/${PN}" || die +} diff --git a/dev-python/zodb/zodb-5.8.0.ebuild b/dev-python/zodb/zodb-5.8.0.ebuild index b466595..1e96142 100644 --- a/dev-python/zodb/zodb-5.8.0.ebuild +++ b/dev-python/zodb/zodb-5.8.0.ebuild @@ -16,8 +16,6 @@ S="${WORKDIR}/ZODB-${PV}" LICENSE="ZPL" SLOT="0" KEYWORDS="~amd64" -# Failures -RESTRICT="test" RDEPEND=" dev-python/btrees[${PYTHON_USEDEP}] @@ -26,6 +24,7 @@ RDEPEND=" dev-python/transaction[${PYTHON_USEDEP}] dev-python/zc-lockfile[${PYTHON_USEDEP}] dev-python/zconfig[${PYTHON_USEDEP}] + dev-python/zodbpickle[${PYTHON_USEDEP}] dev-python/zope-interface[${PYTHON_USEDEP}] doc? ( dev-python/sphinxautozconfig[${PYTHON_USEDEP}] @@ -40,23 +39,11 @@ RDEPEND=" ) " DEPEND="${RDEPEND}" -# dev-python/zodbpickle distutils_enable_sphinx docs -distutils_enable_tests unittest +distutils_enable_tests setup.py -src_prepare() { - # strip rdep specific to namespaces - sed -i -e "/'setuptools'/d" setup.py || die - distutils-r1_src_prepare -} - -python_compile() { - distutils-r1_python_compile - find "${BUILD_DIR}" -name '*.pth' -delete || die -} - -src_test() { - cd "${S}/src/zope/untrustedpython" || die - distutils-r1_src_test +python_test() { + zope-testrunner -pvc -j "$(nproc)" --usecompiled \ + --path "${BUILD_DIR}/install$(python_get_sitedir)/ZODB" || die } diff --git a/dev-python/zodbpickle/zodbpickle-2.6.ebuild b/dev-python/zodbpickle/zodbpickle-2.6.ebuild index 4f4efa9..6074a6d 100644 --- a/dev-python/zodbpickle/zodbpickle-2.6.ebuild +++ b/dev-python/zodbpickle/zodbpickle-2.6.ebuild @@ -18,7 +18,7 @@ KEYWORDS="~amd64" RDEPEND="