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

Method search_function

Lib/test/test_codecs.py:3877–3881  ·  view source on GitHub ↗
(encoding)

Source from the content-addressed store, hash-verified

3875 """Test codec name normalization"""
3876 def test_codecs_lookup(self):
3877 def search_function(encoding):
3878 if encoding.startswith("test."):
3879 return (encoding, 2, 3, 4)
3880 else:
3881 return None
3882
3883 codecs.register(search_function)
3884 self.addCleanup(codecs.unregister, search_function)

Callers

nothing calls this directly

Calls 1

startswithMethod · 0.45

Tested by

no test coverage detected