Skip to content

Commit 5be70a1

Browse files
committed
test specifically for the yarl.URL usage we need
previous variant failed on PyPy, but that is yarl.URL("invalid") behaviour we do not depend on
1 parent 28b7d81 commit 5be70a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_http_parser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,9 @@ def test_http_request_parser_utf8_request_line(parser: Any) -> None:
865865
assert msg.compression is None
866866
assert not msg.upgrade
867867
assert not msg.chunked
868-
assert msg.url.path == URL("/P%C3%BCnktchen\udca0\udcef\udcb7").path
868+
# python HTTP parser depends on Cython and CPython URL to match
869+
# .. but yarl.URL("/abs") is not equal to URL.build(path="/abs"), see #6409
870+
assert msg.url == URL.build(path="/Pünktchen\udca0\udcef\udcb7", encoded=True)
869871

870872

871873
def test_http_request_parser_utf8(parser: Any) -> None:

0 commit comments

Comments
 (0)