commit:     de57766c4c54eb18df4b26796fb53ceb23505b1f
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  4 06:28:17 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Dec  4 08:54:08 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de57766c

dev-python/httpx: fix testing timeouts

- Disable 2 tests that fail on all devboxes
  ({arm,ppc}{,64},sparc,x86,amd64,hppa)
  Those two are unimportant.
- Increase timeout for one test that is too fast for hppa
- Do small cleanup in ebuild

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/httpx/httpx-0.19.0.ebuild | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/dev-python/httpx/httpx-0.19.0.ebuild 
b/dev-python/httpx/httpx-0.19.0.ebuild
index dc9db3eda06c..4da735394292 100644
--- a/dev-python/httpx/httpx-0.19.0.ebuild
+++ b/dev-python/httpx/httpx-0.19.0.ebuild
@@ -41,19 +41,20 @@ BDEPEND="
 
 distutils_enable_tests pytest
 
+EPYTEST_DESELECT=(
+       # Internet
+       tests/client/test_proxies.py::test_async_proxy_close
+       tests/client/test_proxies.py::test_sync_proxy_close
+       # known to fail, unimportant test
+       "tests/test_decoders.py::test_text_decoder[data3-iso-8859-1]"
+       
tests/models/test_responses.py::test_response_no_charset_with_iso_8859_1_content
+)
+
 python_prepare_all() {
+       # increase timeout for slower systems
+       sed -e 's/pool=/&10*/' -i tests/test_timeouts.py || die
        # trio does not support py3.10
-       sed -i '/^import trio/d' tests/concurrency.py || die
-       sed -i '/pytest.param("trio", marks=pytest.mark.trio)/d' 
tests/conftest.py || die
+       sed -e '/^import trio/d' -i tests/concurrency.py || die
+       sed -e '/pytest.param("trio", marks=pytest.mark.trio)/d' -i 
tests/conftest.py || die
        distutils-r1_python_prepare_all
 }
-
-python_test() {
-       local deselect=(
-               # Internet
-               tests/client/test_proxies.py::test_async_proxy_close
-               tests/client/test_proxies.py::test_sync_proxy_close
-       )
-
-       epytest ${deselect[@]/#/--deselect }
-}

Reply via email to