(self)
| 163 | eq_(inits, [(B, "init", B), (B, "__init__"), (A, "__init__")]) |
| 164 | |
| 165 | def test_Ai_B(self): |
| 166 | inits = [] |
| 167 | |
| 168 | class A: |
| 169 | def __init__(self): |
| 170 | inits.append((A, "__init__")) |
| 171 | |
| 172 | self.register(A, inits) |
| 173 | |
| 174 | class B(A): |
| 175 | pass |
| 176 | |
| 177 | self.register(B, inits) |
| 178 | |
| 179 | A() |
| 180 | eq_(inits, [(A, "init", A), (A, "__init__")]) |
| 181 | |
| 182 | del inits[:] |
| 183 | |
| 184 | B() |
| 185 | eq_(inits, [(B, "init", B), (A, "__init__")]) |
| 186 | |
| 187 | def test_Ai_Bi_Ci(self): |
| 188 | inits = [] |