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

Method opener_has_handler

Lib/test/test_urllib2.py:1869–1871  ·  view source on GitHub ↗
(self, opener, handler_class)

Source from the content-addressed store, hash-verified

1867class MiscTests(unittest.TestCase):
1868
1869 def opener_has_handler(self, opener, handler_class):
1870 self.assertTrue(any(h.__class__ == handler_class
1871 for h in opener.handlers))
1872
1873 def test_build_opener(self):
1874 class MyHTTPHandler(urllib.request.HTTPHandler):

Callers 1

test_build_openerMethod · 0.95

Calls 2

assertTrueMethod · 0.80
anyFunction · 0.50

Tested by

no test coverage detected