| 496 | |
| 497 | # Same as above, but for a class with an alias: |
| 498 | class BrokenTF6(m.TestFactory6): |
| 499 | def __init__(self, bad): |
| 500 | if bad == 0: |
| 501 | m.TestFactory6.__init__() |
| 502 | elif bad == 1: |
| 503 | a = m.TestFactory2(tag.pointer, 1) |
| 504 | m.TestFactory6.__init__(a, tag.base, 1) |
| 505 | elif bad == 2: |
| 506 | a = m.TestFactory2(tag.pointer, 1) |
| 507 | m.TestFactory6.__init__(a, tag.alias, 1) |
| 508 | elif bad == 3: |
| 509 | m.TestFactory6.__init__( |
| 510 | NotPybindDerived.__new__(NotPybindDerived), tag.base, 1 |
| 511 | ) |
| 512 | elif bad == 4: |
| 513 | m.TestFactory6.__init__( |
| 514 | NotPybindDerived.__new__(NotPybindDerived), tag.alias, 1 |
| 515 | ) |
| 516 | |
| 517 | for arg in (1, 2): |
| 518 | with pytest.raises(TypeError) as excinfo: |
no outgoing calls