Skip to content

Commit cf19b04

Browse files
[PR #10423/51daf719 backport][3.11] Disable writelines for test_write_large_payload_deflate_compression_data_in_eof (#10429)
Co-authored-by: J. Nick Koston <[email protected]> fixes #10421
1 parent 5942b0b commit cf19b04

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGES/10423.packaging.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed test ``test_write_large_payload_deflate_compression_data_in_eof_writelines`` failing with Python 3.12.9+ or 3.13.2+ -- by :user:`bdraco`.

tests/test_http_writer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ def enable_writelines() -> Generator[None, None, None]:
1919
yield
2020

2121

22+
@pytest.fixture
23+
def disable_writelines() -> Generator[None, None, None]:
24+
with mock.patch("aiohttp.http_writer.SKIP_WRITELINES", True):
25+
yield
26+
27+
2228
@pytest.fixture
2329
def force_writelines_small_payloads() -> Generator[None, None, None]:
2430
with mock.patch("aiohttp.http_writer.MIN_PAYLOAD_FOR_WRITELINES", 1):
@@ -104,6 +110,7 @@ async def test_write_payload_length(protocol, transport, loop) -> None:
104110
assert b"da" == content.split(b"\r\n\r\n", 1)[-1]
105111

106112

113+
@pytest.mark.usefixtures("disable_writelines")
107114
async def test_write_large_payload_deflate_compression_data_in_eof(
108115
protocol: BaseProtocol,
109116
transport: asyncio.Transport,

0 commit comments

Comments
 (0)