Skip to content

Commit 51daf71

Browse files
authored
Disable writelines for test_write_large_payload_deflate_compression_data_in_eof (#10423)
1 parent fae142f commit 51daf71

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):
@@ -123,6 +129,7 @@ async def test_write_payload_length(
123129
assert b"da" == content.split(b"\r\n\r\n", 1)[-1]
124130

125131

132+
@pytest.mark.usefixtures("disable_writelines")
126133
async def test_write_large_payload_deflate_compression_data_in_eof(
127134
protocol: BaseProtocol,
128135
transport: asyncio.Transport,

0 commit comments

Comments
 (0)