Download raw body.
[patch]www/py-httpcore: enable `make test`
On 2025/07/27 02:10, wen heping wrote:
> Hi,
>
> Here is a patch for www/py-httpcore.
> Currently `make test` can not work, we can enable `make test`
> with this patch.
Tests work for me already:
===> Regression tests for py3-httpcore-1.0.9
============================= test session starts ==============================
platform openbsd7 -- Python 3.12.11, pytest-8.3.5, pluggy-1.6.0
codspeed: 4.0.0 (disabled, mode: walltime, callgraph: not supported, timer_resolution: 9.0ns)
benchmark: 5.1.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /usr/obj/ports/py-httpcore-1.0.9/httpcore-1.0.9
configfile: pyproject.toml
plugins: benchmark-5.1.0, subtests-0.12.1, xdist-3.5.0, hypothesis-6.124.5, flaky-3.8.1, cov-6.0.0, mock-3.14.0, timeout-2.4.0, trio-0.8.0, codspeed-4.0.0, httpbin-2.0.0, anyio-4.9.0
collected 205 items
tests/_async/test_connection.py .................. [ 8%]
tests/_async/test_connection_pool.py ................................. [ 24%]
tests/_async/test_http11.py .......................... [ 37%]
tests/_async/test_http2.py .................... [ 47%]
tests/_async/test_http_proxy.py ........... [ 52%]
tests/_async/test_integration.py ......127.0.0.1 - - [28/Jul/2025 10:16:59] "GET / HTTP/1.1" 200 9509
[ 55%]
tests/_sync/test_connection.py ......... [ 60%]
tests/_sync/test_connection_pool.py .................. [ 68%]
tests/_sync/test_http11.py ............. [ 75%]
tests/_sync/test_http2.py .......... [ 80%]
tests/_sync/test_http_proxy.py ...... [ 82%]
tests/_sync/test_integration.py ... [ 84%]
tests/test_api.py ... [ 85%]
tests/test_cancellations.py ....XXX....XXX [ 92%]
tests/test_models.py ............... [100%]
=================================== XPASSES ====================================
=========================== short test summary info ============================
XPASS tests/test_cancellations.py::test_h2_timeout_during_handshake[asyncio]
XPASS tests/test_cancellations.py::test_h2_timeout_during_request[asyncio]
XPASS tests/test_cancellations.py::test_h2_timeout_during_response[asyncio]
XPASS tests/test_cancellations.py::test_h2_timeout_during_handshake[trio]
XPASS tests/test_cancellations.py::test_h2_timeout_during_request[trio]
XPASS tests/test_cancellations.py::test_h2_timeout_during_response[trio]
======================== 199 passed, 6 xpassed in 4.29s ========================
> Next time I shall update py-anyio, which will reduce the test fail greatly.
>
>
> Cheers !
> wen
> Index: www/py-httpcore/patches/patch-pyproject_toml
> ===================================================================
> RCS file: www/py-httpcore/patches/patch-pyproject_toml
> diff -N www/py-httpcore/patches/patch-pyproject_toml
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ www/py-httpcore/patches/patch-pyproject_toml 27 Jul 2025 02:06:10 -0000
> @@ -0,0 +1,12 @@
> +Index: pyproject.toml
> +--- pyproject.toml.orig
> ++++ pyproject.toml
> +@@ -91,7 +91,7 @@ ignore_missing_imports = true
> +
> + [tool.pytest.ini_options]
> + addopts = ["-rxXs", "--strict-config", "--strict-markers"]
> +-markers = ["copied_from(source, changes=None): mark test as copied from somewhere else, along with a description of changes made to accodomate e.g. our test setup"]
> ++markers = ["trio: mark tests that use trio", "copied_from(source, changes=None): mark test as copied from somewhere else, along with a description of changes made to accodomate e.g. our test setup"]
> + filterwarnings = ["error"]
> +
> + [tool.coverage.run]
[patch]www/py-httpcore: enable `make test`