MCPcopy Index your code
hub / github.com/ipython/ipython / test_unbind_method

Function test_unbind_method

tests/test_guarded_eval.py:948–956  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

946
947
948def test_unbind_method():
949 class X(list):
950 def index(self, k):
951 return "CUSTOM"
952
953 x = X()
954 assert _unbind_method(x.index) is X.index
955 assert _unbind_method([].index) is list.index
956 assert _unbind_method(list.index) is None
957
958
959def test_assumption_instance_attr_do_not_matter():

Callers

nothing calls this directly

Calls 2

_unbind_methodFunction · 0.90
XClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…