public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/geventhttpclient/files/, dev-python/geventhttpclient/
@ 2020-05-22 22:04 Louis Sautier
  0 siblings, 0 replies; only message in thread
From: Louis Sautier @ 2020-05-22 22:04 UTC (permalink / raw
  To: gentoo-commits

commit:     4194c01ed1501a5f0771185ff591c860ab2e4f33
Author:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Fri May 22 21:58:46 2020 +0000
Commit:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Fri May 22 22:04:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4194c01e

dev-python/geventhttpclient: do not install tests

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>

 .../geventhttpclient-1.4.0-dont-install-tests.patch    | 18 ++++++++++++++++++
 ...t-1.4.0.ebuild => geventhttpclient-1.4.0-r1.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 00000000000..395628dc40f
--- /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
similarity index 71%
rename from dev-python/geventhttpclient/geventhttpclient-1.4.0.ebuild
rename to dev-python/geventhttpclient/geventhttpclient-1.4.0-r1.ebuild
index f65c0460175..9f4094bf13b 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}"
 }


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-22 22:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-22 22:04 [gentoo-commits] repo/gentoo:master commit in: dev-python/geventhttpclient/files/, dev-python/geventhttpclient/ Louis Sautier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox