Skip to content

Commit 7229727

Browse files
lesnik512claude
andcommitted
tests: drop stale data=<async-iterable> duplicate (httpx2 deprecation)
Test at line 437 was the pre-rename `_data` version covering the same async-iterable streaming-body marker as the canonical `_content` test at line 387 — pytest was silently shadowing the canonical with the stale one. Removing the duplicate clears the httpx2 deprecation warning ("Use 'content=<...>' to upload raw bytes/text content") and restores test_retry.py to its intended shape. Coverage stays at 100% (the canonical _content test exercises the same _is_streaming_body_async branch). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fef7692 commit 7229727

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

tests/test_retry.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -434,24 +434,6 @@ def handler(request: httpx2.Request) -> httpx2.Response:
434434
assert "httpware.streaming_body" not in seen_extensions[0]
435435

436436

437-
async def test_client_post_with_async_iterable_data_marks_extensions() -> None:
438-
seen_extensions: list[dict[str, object]] = []
439-
440-
def handler(request: httpx2.Request) -> httpx2.Response:
441-
seen_extensions.append(dict(request.extensions))
442-
return httpx2.Response(HTTPStatus.OK, request=request)
443-
444-
async def streamed_data() -> typing.AsyncIterator[bytes]:
445-
yield b"x"
446-
447-
transport = httpx2.MockTransport(handler)
448-
client = AsyncClient(httpx2_client=httpx2.AsyncClient(transport=transport))
449-
await client.post("https://example.test/upload", data=streamed_data())
450-
451-
assert len(seen_extensions) == 1
452-
assert seen_extensions[0].get("httpware.streaming_body") is True
453-
454-
455437
def test_is_streaming_body_true_for_async_iterable_files() -> None:
456438
"""_is_streaming_body returns True for an async-iterable, covering the files= path."""
457439

0 commit comments

Comments
 (0)