From: Anthony Geay Date: Fri, 21 Feb 2020 14:41:14 +0000 (+0100) Subject: Fix for int64 config on debian9 X-Git-Tag: V9_5_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0935509e2f2e02b26d7f3485a7dd48cae83a9ae1;p=tools%2Fmedcoupling.git Fix for int64 config on debian9 --- diff --git a/src/MEDLoader/Swig/MEDLoaderTest3.py b/src/MEDLoader/Swig/MEDLoaderTest3.py index 5c37e3996..51a661a2c 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest3.py +++ b/src/MEDLoader/Swig/MEDLoaderTest3.py @@ -2282,9 +2282,9 @@ class MEDLoaderTest3(unittest.TestCase): f2.setTime(2.,1,-1) 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.getHeapMemorySize(), range(2348 - 130, 2608 + 400 + (10 + 2) * 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))) + self.assertIn(fff[1, -1].getHeapMemorySize(), range(538 + (50 *(MEDCouplingSizeOfIDs()//8)) - 50, 900 + (50 *(MEDCouplingSizeOfIDs()//8)) + 30 + 4 * strMulFac)) pass def internalCurveLinearMesh1(self): @@ -3232,7 +3232,7 @@ class MEDLoaderTest3(unittest.TestCase): ff0=MEDFileField1TS(fname,"FieldCellPfl",False) self.assertEqual(ff0.getUndergroundDataArray().getInfoOnComponents(),["XX [pm]","YYY [hm]"]) heap_memory_ref=ff0.getHeapMemorySize() - self.assertIn(heap_memory_ref, list(range(350, 600 + 6 * strMulFac))) + self.assertIn(heap_memory_ref, list(range(350, 700 + 6 * strMulFac))) ff0.loadArrays() ## arr=DataArrayDouble(100) ; arr.iota() ; arr.rearrange(2) self.assertTrue(ff0.getUndergroundDataArray().isEqualWithoutConsideringStr(arr,1e-14)) @@ -3250,7 +3250,7 @@ class MEDLoaderTest3(unittest.TestCase): self.assertEqual(ff0.getUndergroundDataArray().getIJ(30,1),5.5) self.assertTrue(not ff0.getUndergroundDataArray().isEqualWithoutConsideringStr(arr,1e-14)) heap_memory_ref=ff0.getHeapMemorySize() - self.assertIn(heap_memory_ref, list(range(1100, 1400 + 2 * strMulFac))) + self.assertIn(heap_memory_ref, list(range(1100, 1600 + 2 * strMulFac))) ff0.unloadArrays() hmd=ff0.getHeapMemorySize()-heap_memory_ref self.assertEqual(hmd,-800) # -50*8*2 @@ -3259,7 +3259,7 @@ class MEDLoaderTest3(unittest.TestCase): # ff0=MEDFileField1TS(fname,"FieldCellPfl",-1,-1,False) heap_memory_ref=ff0.getHeapMemorySize() - self.assertIn(heap_memory_ref, list(range(299, 620 + 6 * strMulFac))) + self.assertIn(heap_memory_ref, list(range(299, 670 + 6 * strMulFac))) ff0.loadArrays() ## self.assertTrue(ff0.getUndergroundDataArray().isEqualWithoutConsideringStr(arr,1e-14)) self.assertEqual(ff0.getHeapMemorySize()-heap_memory_ref,50*8*2) @@ -3276,14 +3276,14 @@ class MEDLoaderTest3(unittest.TestCase): # ff0=MEDFileAnyTypeFieldMultiTS.New(fname,fieldName,False) heap_memory_ref=ff0.getHeapMemorySize() - self.assertIn(heap_memory_ref, list(range(5536, 9212 + (80 + 26 + 1) * strMulFac))) + self.assertIn(heap_memory_ref, range(5536, 9212 + (80 + 26 + 1) * strMulFac)) ff0.loadArrays() self.assertEqual(ff0.getHeapMemorySize()-heap_memory_ref,20*70*8*2) del ff0 # ffs=MEDFileFields(fname,False) heap_memory_ref=ffs.getHeapMemorySize() - self.assertIn(heap_memory_ref, list(range(5335, 10031 + (80 + 50 + len(ffs)) * strMulFac))) + self.assertIn(heap_memory_ref, range(5335, 10331 + (80 + 50 + len(ffs)) * strMulFac)) ffs.loadArrays() self.assertEqual(ffs.getHeapMemorySize()-heap_memory_ref,20*70*8*2+70*8*2+50*8*2) pass