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

Method test_Ai_bi

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

Source from the content-addressed store, hash-verified

117 eq_(inits, [(B, "init", B), (B, "__init__"), (A, "__init__")])
118
119 def test_Ai_bi(self):
120 inits = []
121
122 class A:
123 def __init__(self):
124 inits.append((A, "__init__"))
125
126 self.register(A, inits)
127
128 class B(A):
129 def __init__(self):
130 inits.append((B, "__init__"))
131 super().__init__()
132
133 A()
134 eq_(inits, [(A, "init", A), (A, "__init__")])
135
136 del inits[:]
137
138 B()
139 eq_(inits, [(B, "__init__"), (A, "init", B), (A, "__init__")])
140
141 def test_Ai_Bi(self):
142 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