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

Function test_m_clone

tests/test_class_sh_trampoline_unique_ptr.py:16–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15
16def test_m_clone():
17 obj = MyClass()
18 while True:
19 obj.set_val(5)
20 obj = m.clone(obj)
21 assert obj.get_val() == 5 + 3
22 assert obj.foo() == 10 + 5 + 3
23 return # Comment out for manual leak checking (use `top` command).
24
25
26def test_m_clone_and_foo():

Callers

nothing calls this directly

Calls 3

fooMethod · 0.95
MyClassClass · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected