Skip to content

Commit da9e835

Browse files
committed
Add unit test for Mass multiple inheritance
The multiple inheritance property of Mass has been identified problematic in a previous pull request #325. The test in this commit succeeds if Mass is defined with the label py::multiple_inheritance(). Otherwise it crashes.
1 parent 26b4611 commit da9e835

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bindings/Sofa/tests/Core/Mass.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,8 @@ def test_mass_matrix_access_blocks3x3(self):
5454
self.assertEqual(M.ndim, 2)
5555
self.assertEqual(M.shape, (960, 960))
5656
self.assertEqual(M.nnz, 9480)
57+
58+
def test_mass_mstate(self):
59+
60+
root = self.simulate_beam("CompressedRowSparseMatrixMat3x3d")
61+
self.assertNotEqual(root.mass.mstate, None)

0 commit comments

Comments
 (0)