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

Function test_reallocation_g

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

Source from the content-addressed store, hash-verified

462
463@pytest.mark.skipif("env.GRAALPY", reason="Cannot reliably trigger GC")
464def test_reallocation_g(capture, msg):
465 with capture:
466 create_and_destroy(5, "hi")
467 assert msg(capture) == strip_comments(
468 """
469 noisy new # preallocation needed before invoking first placement new
470 noisy delete # delete before considering new-style constructor
471 noisy new # preallocation for second placement new
472 noisy placement new # Placement new in the second placement new overload
473 NoisyAlloc(int 5) # construction
474 ---
475 ~NoisyAlloc() # Destructor
476 noisy delete # operator delete
477 """
478 )
479
480
481def test_invalid_self():

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