From: eap Date: Thu, 19 Dec 2019 13:10:46 +0000 (+0300) Subject: LOT6: fix the last failing test X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=224a65997645fbdbe79b0356dc8b3fe43ef516e2;p=tools%2Fmedcoupling.git LOT6: fix the last failing test --- diff --git a/src/MEDLoader/Swig/MEDLoaderTest3.py b/src/MEDLoader/Swig/MEDLoaderTest3.py index baed8603e..6596505fa 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest3.py +++ b/src/MEDLoader/Swig/MEDLoaderTest3.py @@ -2256,12 +2256,16 @@ class MEDLoaderTest3(unittest.TestCase): m=m.buildUnstructured() m.setName("mm") f=m.getMeasureField(False) - self.assertIn(m.getHeapMemorySize(), list(range(3552 - 100, 3552 + 100 + 4 * strMulFac))) - self.assertIn(f.getHeapMemorySize(), list(range(4215 - 100, 4215 + 100 + 8 * strMulFac))) + cooMem = 100 * 2 * 8 + nodalMem = 5 * 81 * MEDCouplingSizeOfIDs()//8 + indexMem = 82 * MEDCouplingSizeOfIDs()//8 + meshMem = cooMem + nodalMem + indexMem + self.assertIn(m.getHeapMemorySize(), list(range(meshMem - 100, meshMem + 100 + 4 * strMulFac))) + self.assertIn(f.getHeapMemorySize(), list(range(meshMem + 81*8 - 100, meshMem + 81*8 + 100 + 8 * strMulFac))) # mm=MEDFileUMesh() mm.setMeshAtLevel(0,m) - self.assertIn(mm.getHeapMemorySize(), list(range(3889 - 100, 4225 + 100 + 10 * strMulFac))) + self.assertIn(mm.getHeapMemorySize(), list(range(meshMem + 81*(MEDCouplingSizeOfIDs()//8) - 100, meshMem + 81*(MEDCouplingSizeOfIDs()//8) + 100 + 10 * strMulFac))) ff=MEDFileField1TS() ff.setFieldNoProfileSBT(f) self.assertIn(ff.getHeapMemorySize(), list(range(771 - 40, 871 + 21 + (4 + 1) * strMulFac))) @@ -2278,8 +2282,8 @@ class MEDLoaderTest3(unittest.TestCase): pfl=DataArrayInt.Range(0,50,1) ; pfl.setName("pfl") fff.appendFieldProfile(f2,mm,0,pfl) self.assertIn(fff.getHeapMemorySize(), list(range(2348 - 130, 2608 + 100 + (10 + 2) * strMulFac))) - self.assertIn(fff.getProfile("pfl").getHeapMemorySize(), list(range(204 - 10, 204 + 10 + 2 * strMulFac))) - self.assertIn(fff[1, -1].getHeapMemorySize(), list(range(738 - 50, 838 + 30 + 4 * strMulFac))) + self.assertIn(fff.getProfile("pfl").getHeapMemorySize(), list(range(50 *(MEDCouplingSizeOfIDs()//8) - 10, 50 *(MEDCouplingSizeOfIDs()//8) + 10 + 2 * strMulFac))) + self.assertIn(fff[1, -1].getHeapMemorySize(), list(range(538 + (50 *(MEDCouplingSizeOfIDs()//8)) - 50, 638 + (50 *(MEDCouplingSizeOfIDs()//8)) + 30 + 4 * strMulFac))) pass def internalCurveLinearMesh1(self):