MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / register

Method register

test/orm/test_instrumentation.py:33–42  ·  view source on GitHub ↗
(self, cls, canary)

Source from the content-addressed store, hash-verified

31 )
32
33 def register(self, cls, canary):
34 original_init = cls.__init__
35 instrumentation.register_class(cls)
36 ne_(cls.__init__, original_init)
37 manager = instrumentation.manager_of_class(cls)
38
39 def init(state, args, kwargs):
40 canary.append((cls, "init", state.class_))
41
42 event.listen(manager, "init", init, raw=True)
43
44 def test_ai(self):
45 inits = []

Callers 15

test_AMethod · 0.95
test_AiMethod · 0.95
test_ai_BMethod · 0.95
test_ai_BiMethod · 0.95
test_Ai_biMethod · 0.95
test_Ai_BiMethod · 0.95
test_Ai_BMethod · 0.95
test_Ai_Bi_CiMethod · 0.95
test_Ai_bi_CiMethod · 0.95
test_Ai_b_CiMethod · 0.95
test_Ai_B_CiMethod · 0.95
test_Ai_B_CMethod · 0.95

Calls 3

ne_Function · 0.90
manager_of_classMethod · 0.80
listenMethod · 0.45

Tested by

no test coverage detected