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

Method test_willclose

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

Source from the content-addressed store, hash-verified

325 self.unfakehttp()
326
327 def test_willclose(self):
328 self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!")
329 try:
330 resp = urllib.request.urlopen("http://www.python.org")
331 self.assertTrue(resp.will_close)
332 finally:
333 self.unfakehttp()
334
335 @unittest.skipUnless(ssl, "ssl module required")
336 def test_url_path_with_control_char_rejected(self):

Callers

nothing calls this directly

Calls 4

fakehttpMethod · 0.80
assertTrueMethod · 0.80
unfakehttpMethod · 0.80
urlopenMethod · 0.45

Tested by

no test coverage detected