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

Function test_instance_new

tests/test_class.py:66–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64
65
66def test_instance_new():
67 instance = m.NoConstructorNew() # .__new__(m.NoConstructor.__class__)
68
69 if env.GRAALPY:
70 pytest.skip("ConstructorStats is incompatible with GraalPy.")
71
72 cstats = ConstructorStats.get(m.NoConstructorNew)
73 assert cstats.alive() == 1
74 del instance
75 assert cstats.alive() == 0
76
77
78def test_pass_unique_ptr():

Callers

nothing calls this directly

Calls 3

NoConstructorNewMethod · 0.80
aliveMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected