MCPcopy Create free account
hub / github.com/pybind/pybind11 / BrokenTF6

Class BrokenTF6

tests/test_factory_constructors.py:498–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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:

Callers 1

test_invalid_selfFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_invalid_selfFunction · 0.68