Skip to content

Commit

Permalink
Disable writelines for test_write_large_payload_deflate_compression_d…
Browse files Browse the repository at this point in the history
…ata_in_eof (#10423)
  • Loading branch information
bdraco authored Feb 6, 2025
1 parent fae142f commit 51daf71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/10423.packaging.rst
Original file line number Diff line number Diff line change
@@ -0,0 +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`.
7 changes: 7 additions & 0 deletions tests/test_http_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ def enable_writelines() -> Generator[None, None, None]:
yield


@pytest.fixture
def disable_writelines() -> Generator[None, None, None]:
with mock.patch("aiohttp.http_writer.SKIP_WRITELINES", True):
yield


@pytest.fixture
def force_writelines_small_payloads() -> Generator[None, None, None]:
with mock.patch("aiohttp.http_writer.MIN_PAYLOAD_FOR_WRITELINES", 1):
Expand Down Expand Up @@ -123,6 +129,7 @@ async def test_write_payload_length(
assert b"da" == content.split(b"\r\n\r\n", 1)[-1]


@pytest.mark.usefixtures("disable_writelines")
async def test_write_large_payload_deflate_compression_data_in_eof(
protocol: BaseProtocol,
transport: asyncio.Transport,
Expand Down

0 comments on commit 51daf71

Please sign in to comment.