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

Method test_add_non_handler

Lib/test/test_urllib2.py:574–578  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

572class OpenerDirectorTests(unittest.TestCase):
573
574 def test_add_non_handler(self):
575 class NonHandler(object):
576 pass
577 self.assertRaises(TypeError,
578 OpenerDirector().add_handler, NonHandler())
579
580 def test_no_protocol_methods(self):
581 # test the case that methods starts with handler type without the protocol

Callers

nothing calls this directly

Calls 3

OpenerDirectorClass · 0.90
NonHandlerClass · 0.85
assertRaisesMethod · 0.45

Tested by

no test coverage detected