1 import cpp2pybind11, sys, gc
4 a = pinocchio.SE3.Random()
5 b = pinocchio.SE3.Random()
6 assert cpp2pybind11.multiply_se3_1(a, b) == a * b
7 assert cpp2pybind11.multiply_se3(a, b) == a * b
8 assert cpp2pybind11.no_wrapper.multiply_se3(a, b) == a * b
9 assert cpp2pybind11.multiply_se3(a) == a
18 n = sys.getrefcount(v)
19 print(
"ref count of", what, idv, n)
22 m = cpp2pybind11.make_model()
24 print(cpp2pybind11.get_ptr(m))
28 cpp2pybind11.testModel1(m)
30 assert m.name.startswith(
"testModel1")
32 addr2 = cpp2pybind11.testModel2(m, 1)
34 assert m.name.startswith(
"testModel2")
36 addr3 = cpp2pybind11.testModel3(m, 2)
40 mm = cpp2pybind11.return_same_model_broken(m)
41 assert cpp2pybind11.get_ptr(m) != cpp2pybind11.get_ptr(mm)
43 mm = cpp2pybind11.return_same_model(m)
49 assert cpp2pybind11.get_ptr(m) == cpp2pybind11.get_ptr(mm)