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

Method test_empty_socket

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

Source from the content-addressed store, hash-verified

468 self.unfakehttp()
469
470 def test_empty_socket(self):
471 # urlopen() raises OSError if the underlying socket does not send any
472 # data. (#1680230)
473 self.fakehttp(b'')
474 try:
475 self.assertRaises(OSError, urllib.request.urlopen, "http://something")
476 finally:
477 self.unfakehttp()
478
479 def test_missing_localfile(self):
480 # Test for #10836

Callers

nothing calls this directly

Calls 3

fakehttpMethod · 0.80
unfakehttpMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected