Salome HOME
CheckDeepEquivalWith should also return OK with two empty meshes.
[modules/med.git] / src / MEDCoupling_Swig / MEDCouplingBasicsTest.py
index 96ae8c4b91fe2516108d4b3827d245f132447122..37ac35f00e9ae6511e19e03a3f024bac64898dac 100644 (file)
@@ -2783,6 +2783,15 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         self.assertRaises(InterpKernelException, m.checkDeepEquivalWith, m2, 2, eps)
         pass
 
+    def testSwig2CheckDeepEquivalWith2(self):
+        eps = 1.0e-8
+        m = MEDCouplingUMesh("tst", 2)
+        m.setCoords(DataArrayDouble([], 0,2))
+        m.setConnectivity(DataArrayInt([]), DataArrayInt([0]))
+        m2 = m.deepCpy()
+        m.checkDeepEquivalWith(m2, 0, eps)  # Should not raise!
+        pass
+
     def testCopyTinyStringsFromOnFields(self):
         m=MEDCouplingDataForTest.build3DSurfTargetMesh_1();
         nbOfCells=m.getNumberOfCells();