MCPcopy Index your code
hub / github.com/RustPython/RustPython / opener_has_handler

Method opener_has_handler

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

Source from the content-addressed store, hash-verified

1850class MiscTests(unittest.TestCase):
1851
1852 def opener_has_handler(self, opener, handler_class):
1853 self.assertTrue(any(h.__class__ == handler_class
1854 for h in opener.handlers))
1855
1856 def test_build_opener(self):
1857 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