| 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 = [] |