MCPcopy Index your code
hub / github.com/python/cpython / test_http_roundtrips

Method test_http_roundtrips

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

Source from the content-addressed store, hash-verified

357 ('a', '/b/c/d;p', 'q', 'f')),
358 ])
359 def test_http_roundtrips(self, bytes, scheme, url, parsed, split):
360 # urllib.parse.urlsplit treats 'http:' as an optimized special case,
361 # so we test both 'http:' and 'https:' in all the following.
362 # Three cheers for white box knowledge!
363 if bytes:
364 scheme = str_encode(scheme)
365 url = str_encode(url)
366 parsed = tuple_encode(parsed)
367 split = tuple_encode(split)
368 url = scheme + url
369 parsed = (scheme,) + parsed
370 split = (scheme,) + split
371 self.checkRoundtrips(url, parsed, split)
372
373 def checkJoin(self, base, relurl, expected, *, relroundtrip=True):
374 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