MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_http_roundtrips

Method test_http_roundtrips

Lib/test/test_urlparse.py:328–340  ·  view source on GitHub ↗
(self, bytes, scheme, url, parsed, split)

Source from the content-addressed store, hash-verified

326 ('a', '/b/c/d;p', 'q', 'f')),
327 ])
328 def test_http_roundtrips(self, bytes, scheme, url, parsed, split):
329 # urllib.parse.urlsplit treats 'http:' as an optimized special case,
330 # so we test both 'http:' and 'https:' in all the following.
331 # Three cheers for white box knowledge!
332 if bytes:
333 scheme = str_encode(scheme)
334 url = str_encode(url)
335 parsed = tuple_encode(parsed)
336 split = tuple_encode(split)
337 url = scheme + url
338 parsed = (scheme,) + parsed
339 split = (scheme,) + split
340 self.checkRoundtrips(url, parsed, split)
341
342 def checkJoin(self, base, relurl, expected, *, relroundtrip=True):
343 with self.subTest(base=base, relurl=relurl):

Callers

nothing calls this directly

Calls 3

checkRoundtripsMethod · 0.95
str_encodeFunction · 0.85
tuple_encodeFunction · 0.85

Tested by

no test coverage detected