summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-python/pypiserver/pypiserver-1.4.2.ebuild31
1 files changed, 19 insertions, 12 deletions
diff --git a/dev-python/pypiserver/pypiserver-1.4.2.ebuild b/dev-python/pypiserver/pypiserver-1.4.2.ebuild
index d33d2bc3bcf9..18a622a294c3 100644
--- a/dev-python/pypiserver/pypiserver-1.4.2.ebuild
+++ b/dev-python/pypiserver/pypiserver-1.4.2.ebuild
@@ -32,16 +32,23 @@ DOCS=( README.rst )
distutils_enable_tests pytest
-src_prepare() {
- sed -i -e "/tox/d" setup.py || die
-
- # https://github.com/pypiserver/pypiserver/issues/312
- sed -e 's:test_root_count:_&:' \
- -i tests/test_app.py || die
- sed -e 's:test_hash_algos:_&:' \
- -e 's:test_pipInstall_openOk:_&:' \
- -e 's:test_pipInstall_authedOk:_&:' \
- -i tests/test_server.py || die
-
- distutils-r1_src_prepare
+python_test() {
+ local EPYTEST_DESELECT=(
+ # Internet
+ tests/test_server.py::test_hash_algos
+ tests/test_server.py::test_pipInstall_openOk
+ tests/test_server.py::test_pipInstall_authedOk
+ )
+
+ if ! has_version "dev-python/twine[${PYTHON_USEDEP}]"; then
+ EPYTEST_DESELECT+=(
+ tests/test_server.py::test_twine_register_authed_ok
+ tests/test_server.py::test_twine_register_open
+ tests/test_server.py::test_twine_upload_authed
+ tests/test_server.py::test_twine_upload_open
+ tests/test_server.py::test_twine_upload_partial_authed
+ )
+ fi
+
+ epytest
}