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

Function test_unique_nodelete4a

tests/test_smart_ptr.py:137–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135
136@pytest.mark.skipif("env.GRAALPY", reason="Cannot reliably trigger GC")
137def test_unique_nodelete4a():
138 o = m.MyObject4a(23)
139 assert o.value == 23
140 cstats = ConstructorStats.get(m.MyObject4a)
141 assert cstats.alive() == 1
142 del o
143 assert cstats.alive() == 1
144 m.MyObject4a.cleanup_all_instances()
145 assert cstats.alive() == 0
146
147
148@pytest.mark.skipif("env.GRAALPY", reason="Cannot reliably trigger GC")

Callers

nothing calls this directly

Calls 3

MyObject4aMethod · 0.80
aliveMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected