From 277fc6633e5bf2ad74996976240654f35df177bf Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Sun, 27 Oct 2024 01:01:56 +0900 Subject: [PATCH] Fix unit tests due to a missing plugin [Mapping] (#463) * fix unit tests due to missing plugin * fix python unit test due to missing plugin --- bindings/Modules/tests/SofaConstraintSolver/matrix_access.py | 1 + bindings/Sofa/tests/Core/BaseLink.py | 1 + bindings/Sofa/tests/Simulation/Node.py | 1 + 3 files changed, 3 insertions(+) diff --git a/bindings/Modules/tests/SofaConstraintSolver/matrix_access.py b/bindings/Modules/tests/SofaConstraintSolver/matrix_access.py index d4a7f289..f6862de6 100644 --- a/bindings/Modules/tests/SofaConstraintSolver/matrix_access.py +++ b/bindings/Modules/tests/SofaConstraintSolver/matrix_access.py @@ -14,6 +14,7 @@ def simulate_pendulum(self): "Sofa.Component.Constraint.Projective", "Sofa.Component.IO.Mesh", "Sofa.Component.LinearSolver.Direct", + "Sofa.Component.Mapping.NonLinear", "Sofa.Component.Mapping.MappedMatrix", "Sofa.Component.Mass", "Sofa.Component.ODESolver.Backward", diff --git a/bindings/Sofa/tests/Core/BaseLink.py b/bindings/Sofa/tests/Core/BaseLink.py index 5ced9c14..fcdeb8e1 100644 --- a/bindings/Sofa/tests/Core/BaseLink.py +++ b/bindings/Sofa/tests/Core/BaseLink.py @@ -8,6 +8,7 @@ def create_scene(rootName="root"): root = Sofa.Core.Node(rootName) root.addObject("RequiredPlugin", name="Sofa.Component.StateContainer") root.addObject("RequiredPlugin", name="Sofa.Component.SolidMechanics.Spring") + root.addObject("RequiredPlugin", name="Sofa.Component.Mapping.Linear") return root class Test(unittest.TestCase): diff --git a/bindings/Sofa/tests/Simulation/Node.py b/bindings/Sofa/tests/Simulation/Node.py index 6388b501..f0cc5b35 100644 --- a/bindings/Sofa/tests/Simulation/Node.py +++ b/bindings/Sofa/tests/Simulation/Node.py @@ -285,6 +285,7 @@ def test_getMechanicalState(self): def test_getMechanicalMapping(self): root = Sofa.Core.Node("root") root.addObject("RequiredPlugin", name="Sofa.Component.StateContainer") + root.addObject("RequiredPlugin", name="Sofa.Component.Mapping.Linear") root.addObject("MechanicalObject", name="t1") root.addObject("MechanicalObject", name="t2") mm = root.addObject("BarycentricMapping", input="@/t1", output="@/t2")