python/coverage: update to 7.6.5
[oi-userland.git] / components / python / httpcore / patches / 01-no-trio.patch
blob523c7d3335f90e526a8e0362cdcbedeecbe9fdc5
1 we have no trio
3 --- httpcore-1.0.6/tests/test_models.py.orig
4 +++ httpcore-1.0.6/tests/test_models.py
5 @@ -150,28 +150,3 @@
6 async def __aiter__(self) -> typing.AsyncIterator[bytes]:
7 for chunk in self._chunks:
8 yield chunk
11 -@pytest.mark.trio
12 -async def test_response_async_read():
13 - stream = AsyncByteIterator([b"Hello, ", b"world!"])
14 - response = httpcore.Response(200, content=stream)
15 - assert await response.aread() == b"Hello, world!"
16 - assert response.content == b"Hello, world!"
19 -@pytest.mark.trio
20 -async def test_response_async_streaming():
21 - stream = AsyncByteIterator([b"Hello, ", b"world!"])
22 - response = httpcore.Response(200, content=stream)
23 - content = b"".join([chunk async for chunk in response.aiter_stream()])
24 - assert content == b"Hello, world!"
26 - # We streamed the response rather than reading it, so .content is not available.
27 - with pytest.raises(RuntimeError):
28 - response.content
30 - # Once we've streamed the response, we can't access the stream again.
31 - with pytest.raises(RuntimeError):
32 - async for chunk in response.aiter_stream():
33 - pass # pragma: nocover
34 --- httpcore-1.0.6/tests/_async/test_connection_pool.py.orig
35 +++ httpcore-1.0.6/tests/_async/test_connection_pool.py
36 @@ -4,7 +4,7 @@
37 import hpack
38 import hyperframe.frame
39 import pytest
40 -import trio as concurrency
41 +concurrency = pytest.importorskip("trio")
43 import httpcore