MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_Ai_b_Ci

Method test_Ai_b_Ci

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

Source from the content-addressed store, hash-verified

269 )
270
271 def test_Ai_b_Ci(self):
272 inits = []
273
274 class A:
275 def __init__(self):
276 inits.append((A, "__init__"))
277
278 self.register(A, inits)
279
280 class B(A):
281 pass
282
283 class C(B):
284 def __init__(self):
285 inits.append((C, "__init__"))
286 super().__init__()
287
288 self.register(C, inits)
289
290 A()
291 eq_(inits, [(A, "init", A), (A, "__init__")])
292
293 del inits[:]
294
295 B()
296 eq_(inits, [(A, "init", B), (A, "__init__")])
297
298 del inits[:]
299 C()
300 eq_(inits, [(C, "init", C), (C, "__init__"), (A, "__init__")])
301
302 def test_Ai_B_Ci(self):
303 inits = []

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected