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

Method test_url_fragment

Lib/test/test_urllib.py:317–325  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

315 self.unfakehttp()
316
317 def test_url_fragment(self):
318 # Issue #11703: geturl() omits fragments in the original URL.
319 url = 'http://docs.python.org/library/urllib.html#OK'
320 self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!")
321 try:
322 fp = urllib.request.urlopen(url)
323 self.assertEqual(fp.geturl(), url)
324 finally:
325 self.unfakehttp()
326
327 def test_willclose(self):
328 self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!")

Callers

nothing calls this directly

Calls 5

fakehttpMethod · 0.80
unfakehttpMethod · 0.80
urlopenMethod · 0.45
assertEqualMethod · 0.45
geturlMethod · 0.45

Tested by

no test coverage detected