Skip to content

Commit

Permalink
Ignore mypy in some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xdegaye committed Jan 26, 2025
1 parent a456938 commit a6d61fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_http_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1768,8 +1768,8 @@ async def test_parse_chunked_payload_split_CRLF(
for lax, SEP in ((False, b"\r\n"), (True, b"\n")):
out = aiohttp.StreamReader(protocol, 2**16, loop=loop)
p = HttpPayloadParser(out, chunked=True, lax=lax)
p.feed_data(b"4\r\nasdf", SEP=SEP) # type: ignore
p.feed_data(b"\r\n0\r\n\r\n", SEP=SEP) # type: ignore
p.feed_data(b"4\r\nasdf", SEP=SEP) # type: ignore[arg-type]
p.feed_data(b"\r\n0\r\n\r\n", SEP=SEP) # type: ignore[arg-type]

assert out.is_eof()
assert b"asdf" == b"".join(out._buffer)
Expand All @@ -1781,8 +1781,8 @@ async def test_parse_chunked_payload_split_CRLF2(
for lax, SEP in ((False, b"\r\n"), (True, b"\n")):
out = aiohttp.StreamReader(protocol, 2**16, loop=loop)
p = HttpPayloadParser(out, chunked=True, lax=lax)
p.feed_data(b"4\r\nasdf\r", SEP=SEP) # type: ignore
p.feed_data(b"\n0\r\n\r\n", SEP=SEP) # type: ignore
p.feed_data(b"4\r\nasdf\r", SEP=SEP) # type: ignore[arg-type]
p.feed_data(b"\n0\r\n\r\n", SEP=SEP) # type: ignore[arg-type]

assert out.is_eof()
assert b"asdf" == b"".join(out._buffer)
Expand All @@ -1795,8 +1795,8 @@ async def test_parse_chunked_payload_split_CRLF3(
out = aiohttp.StreamReader(protocol, 2**16, loop=loop)
p = HttpPayloadParser(out, chunked=True, lax=lax)
with pytest.raises(http_exceptions.TransferEncodingError):
p.feed_data(b"4\r\nasdf", SEP=SEP) # type: ignore
p.feed_data(b"X\n0\r\n\r\n", SEP=SEP) # type: ignore
p.feed_data(b"4\r\nasdf", SEP=SEP) # type: ignore[arg-type]
p.feed_data(b"X\n0\r\n\r\n", SEP=SEP) # type: ignore[arg-type]
exc = out.exception()
assert isinstance(exc, http_exceptions.TransferEncodingError)
assert "Missing CRLF" in exc.args[0]
Expand Down

0 comments on commit a6d61fe

Please sign in to comment.