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

Function test_reallocation_f

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

Source from the content-addressed store, hash-verified

445
446@pytest.mark.skipif("env.GRAALPY", reason="Cannot reliably trigger GC")
447def test_reallocation_f(capture, msg):
448 with capture:
449 create_and_destroy(4, 0.5)
450 assert msg(capture) == strip_comments(
451 """
452 noisy new # preallocation needed before invoking placement-new overload
453 noisy delete # deallocation of preallocated storage
454 noisy new # Factory pointer allocation
455 NoisyAlloc(int 4) # factory pointer construction
456 ---
457 ~NoisyAlloc() # Destructor
458 noisy delete # operator delete
459 """
460 )
461
462
463@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