MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / test_Ai_Bi

Method test_Ai_Bi

test/orm/test_instrumentation.py:141–163  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

139 eq_(inits, [(B, "__init__"), (A, "init", B), (A, "__init__")])
140
141 def test_Ai_Bi(self):
142 inits = []
143
144 class A:
145 def __init__(self):
146 inits.append((A, "__init__"))
147
148 self.register(A, inits)
149
150 class B(A):
151 def __init__(self):
152 inits.append((B, "__init__"))
153 super().__init__()
154
155 self.register(B, inits)
156
157 A()
158 eq_(inits, [(A, "init", A), (A, "__init__")])
159
160 del inits[:]
161
162 B()
163 eq_(inits, [(B, "init", B), (B, "__init__"), (A, "__init__")])
164
165 def test_Ai_B(self):
166 inits = []

Callers

nothing calls this directly

Calls 4

registerMethod · 0.95
eq_Function · 0.90
AClass · 0.70
BClass · 0.70

Tested by

no test coverage detected