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

Function test_reallocation_c

tests/test_factory_constructors.py:400–411  ·  view source on GitHub ↗
(capture, msg)

Source from the content-addressed store, hash-verified

398
399@pytest.mark.skipif("env.GRAALPY", reason="Cannot reliably trigger GC")
400def test_reallocation_c(capture, msg):
401 with capture:
402 create_and_destroy(2, 3)
403 assert msg(capture) == strip_comments(
404 """
405 noisy new # pointer factory calling "new", allocation
406 NoisyAlloc(int 2) # constructor
407 ---
408 ~NoisyAlloc() # Destructor
409 noisy delete # operator delete
410 """
411 )
412
413
414@pytest.mark.skipif("env.GRAALPY", reason="Cannot reliably trigger GC")

Callers

nothing calls this directly

Calls 3

create_and_destroyFunction · 0.85
msgFunction · 0.85
strip_commentsFunction · 0.85

Tested by

no test coverage detected