summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sbraz@gentoo.org>2020-05-22 23:58:46 +0200
committerLouis Sautier <sbraz@gentoo.org>2020-05-23 00:04:07 +0200
commit4194c01ed1501a5f0771185ff591c860ab2e4f33 (patch)
treeb70b131b60daad9b64717f34e985637fc06759e6 /dev-python
parentnet-analyzer/suricata: bump to 5.0.3 + remove 5.0.2 (diff)
downloadgentoo-4194c01ed1501a5f0771185ff591c860ab2e4f33.tar.gz
gentoo-4194c01ed1501a5f0771185ff591c860ab2e4f33.tar.bz2
gentoo-4194c01ed1501a5f0771185ff591c860ab2e4f33.zip
dev-python/geventhttpclient: do not install tests
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/geventhttpclient/files/geventhttpclient-1.4.0-dont-install-tests.patch18
-rw-r--r--dev-python/geventhttpclient/geventhttpclient-1.4.0-r1.ebuild (renamed from dev-python/geventhttpclient/geventhttpclient-1.4.0.ebuild)15
2 files changed, 24 insertions, 9 deletions
diff --git a/dev-python/geventhttpclient/files/geventhttpclient-1.4.0-dont-install-tests.patch b/dev-python/geventhttpclient/files/geventhttpclient-1.4.0-dont-install-tests.patch
new file mode 100644
index 000000000000..395628dc40f8
--- /dev/null
+++ b/dev-python/geventhttpclient/files/geventhttpclient-1.4.0-dont-install-tests.patch
@@ -0,0 +1,18 @@
+commit 6577190f64072c669c579c78225e23fe79edd90e
+Author: Louis Sautier <sautier.louis@gmail.com>
+Date: Fri May 22 23:36:38 2020 +0200
+
+ Do not install tests
+
+diff --git a/setup.py b/setup.py
+index 6e7a924..c896644 100644
+--- a/setup.py
++++ b/setup.py
+@@ -50,6 +50,7 @@ setup(name='geventhttpclient',
+ author="Antonin Amand",
+ author_email="antonin.amand@gmail.com",
+ packages=find_packages('src'),
++ exclude_package_data={'geventhttpclient': ['tests/*']},
+ license='LICENSE-MIT',
+ package_dir={'': 'src'},
+ ext_modules = [httpparser],
diff --git a/dev-python/geventhttpclient/geventhttpclient-1.4.0.ebuild b/dev-python/geventhttpclient/geventhttpclient-1.4.0-r1.ebuild
index f65c04601751..9f4094bf13b5 100644
--- a/dev-python/geventhttpclient/geventhttpclient-1.4.0.ebuild
+++ b/dev-python/geventhttpclient/geventhttpclient-1.4.0-r1.ebuild
@@ -29,6 +29,10 @@ BDEPEND="
)
"
+# Do not install tests
+# https://github.com/gwik/geventhttpclient/pull/126
+PATCHES=( "${FILESDIR}/${P}-dont-install-tests.patch" )
+
python_prepare_all() {
# Skip SNI tests which require dpkt
sed -i '/^import dpkt.ssl/d' src/geventhttpclient/tests/test_ssl.py || die
@@ -37,14 +41,6 @@ python_prepare_all() {
python_test() {
local skipped_tests=(
- # Require network access
- src/geventhttpclient/tests/test_client.py::test_client_simple
- src/geventhttpclient/tests/test_client.py::test_client_without_leading_slash
- src/geventhttpclient/tests/test_client.py::test_request_with_headers
- src/geventhttpclient/tests/test_client.py::test_response_context_manager
- src/geventhttpclient/tests/test_client.py::test_client_ssl
- src/geventhttpclient/tests/test_client.py::test_ssl_fail_invalid_certificate
- src/geventhttpclient/tests/test_client.py::test_multi_queries_greenlet_safe
# Require dpkg
src/geventhttpclient/tests/test_ssl.py::test_implicit_sni_from_host_in_ssl
src/geventhttpclient/tests/test_ssl.py::test_implicit_sni_from_header_in_ssl
@@ -52,6 +48,7 @@ python_test() {
)
# Append to sys.path to avoid ImportError
# https://bugs.gentoo.org/667758
+ # Skip tests which require internet access
pytest --import-mode=append -vv ${skipped_tests[@]/#/--deselect } \
- || die "Tests failed with ${EPYTHON}"
+ -m "not online" || die "Tests failed with ${EPYTHON}"
}