From: ageay Date: Wed, 6 Jun 2012 14:24:24 +0000 (+0000) Subject: Suppression of duplicated tests with same name. X-Git-Tag: V6_main_FINAL~662 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ca570e832f8bb2ef6169ed876a388fa0fc6f14d0;p=tools%2Fmedcoupling.git Suppression of duplicated tests with same name. --- diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py index 2e11fa216..9cb787855 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py @@ -4379,413 +4379,6 @@ class MEDCouplingBasicsTest(unittest.TestCase): self.assertEqual(arr2[i],da3.getIJ(i,0)); pass pass - - def testDoublyContractedProduct1(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5] - array.setValues(arr1,mesh1.getNumberOfCells(),6); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.doublyContractedProduct(); - f2.checkCoherency(); - self.assertEqual(1,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - for i in xrange(5): - self.assertAlmostEqual(3906.56,f2.getIJ(i,0),9); - pass - # - pass - - def testDeterminant1(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,CONST_ON_TIME_INTERVAL); - f1.setTime(2.3,5,6); - f1.setEndTime(3.8,7,3); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5] - array.setValues(arr1,mesh1.getNumberOfCells(),4); - f1.setArray(array); - #4 components - f1.checkCoherency(); - f2=f1.determinant(); - f2.checkCoherency(); - self.assertEqual(CONST_ON_TIME_INTERVAL,f2.getTimeDiscretization()); - self.assertEqual(1,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfValues()); - for i in xrange(5): - self.assertAlmostEqual(-2.42,f2.getIJ(i,0),13); - pass - #6 components multi arrays with end array not defined - f1=MEDCouplingFieldDouble.New(ON_NODES,LINEAR_TIME); - f1.setTime(2.3,5,6); - f1.setEndTime(3.8,7,3); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr2=[1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, - 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7] - array.setValues(arr2,mesh1.getNumberOfNodes(),6); - f1.setArray(array); - self.assertRaises(InterpKernelException,f1.checkCoherency);#no end array specified ! - # - f2=f1.determinant(); - self.assertEqual(LINEAR_TIME,f2.getTimeDiscretization()); - self.assertEqual(1,f2.getArray().getNumberOfComponents()); - self.assertEqual(9,f2.getNumberOfTuples()); - for i in xrange(9): - self.assertAlmostEqual(137.335,f2.getIJ(i,0),10); - pass - #6 components multi arrays with end array defined - array=DataArrayDouble.New(); - arr3=[7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, - 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5] - array.setValues(arr3,mesh1.getNumberOfNodes(),6); - f1.setEndArray(array); - f1.checkCoherency(); - f2=f1.determinant(); - f2.checkCoherency(); - self.assertEqual(LINEAR_TIME,f2.getTimeDiscretization()); - self.assertEqual(1,f2.getNumberOfComponents()); - self.assertEqual(9,f2.getNumberOfTuples()); - time2,it,order=f2.getTime() - self.assertAlmostEqual(2.3,time2,12); - self.assertEqual(5,it); - self.assertEqual(6,order); - time2,it,order=f2.getEndTime() - self.assertAlmostEqual(3.8,time2,12); - self.assertEqual(7,it); - self.assertEqual(3,order); - for i in xrange(9): - self.assertAlmostEqual(137.335,f2.getIJ(i,0),10); - self.assertAlmostEqual(1289.685,f2.getEndArray().getIJ(i,0),9); - pass - #9 components - f1=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME); - f1.setTime(7.8,10,2); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr4=[1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1] - array.setValues(arr4,mesh1.getNumberOfCells(),9); - f1.setArray(array); - # - f1.checkCoherency(); - f2=f1.determinant(); - f2.checkCoherency(); - self.assertEqual(ONE_TIME,f2.getTimeDiscretization()); - self.assertEqual(1,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - time2,it,order=f2.getTime() - self.assertAlmostEqual(7.8,time2,12); - self.assertEqual(10,it); - self.assertEqual(2,order); - for i in xrange(5): - self.assertAlmostEqual(3.267,f2.getIJ(i,0),13); - pass - pass - - def testEigenValues1(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7] - array.setValues(arr1,mesh1.getNumberOfCells(),6); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.eigenValues(); - f2.checkCoherency(); - self.assertEqual(3,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - expected1=[13.638813677891717,-4.502313844635971,-2.2364998332557486] - for i in xrange(5): - self.assertAlmostEqual(expected1[0],f2.getIJ(i,0),13); - self.assertAlmostEqual(expected1[1],f2.getIJ(i,1),13); - self.assertAlmostEqual(expected1[2],f2.getIJ(i,2),13); - pass - pass - - def testEigenVectors1(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7] - array.setValues(arr1,mesh1.getNumberOfCells(),6); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.eigenVectors(); - f2.checkCoherency(); - self.assertEqual(9,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - expected1=[0.5424262364180696, 0.5351201064614425, 0.6476266283176001,#eigenvect 0 - 0.7381111277307373, 0.06458838384003074, -0.6715804522117897,#eigenvect 1 - -0.4012053603397987, 0.8423032781211455, -0.3599436712889738#eigenvect 2 - ] - for i in xrange(5): - self.assertAlmostEqual(expected1[0],f2.getIJ(i,0),13); - self.assertAlmostEqual(expected1[1],f2.getIJ(i,1),13); - self.assertAlmostEqual(expected1[2],f2.getIJ(i,2),13); - self.assertAlmostEqual(expected1[3],f2.getIJ(i,3),13); - self.assertAlmostEqual(expected1[4],f2.getIJ(i,4),13); - self.assertAlmostEqual(expected1[5],f2.getIJ(i,5),13); - self.assertAlmostEqual(expected1[6],f2.getIJ(i,6),13); - self.assertAlmostEqual(expected1[7],f2.getIJ(i,7),13); - self.assertAlmostEqual(expected1[8],f2.getIJ(i,8),13); - pass - # - pass - - def testInverse1(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1] - array.setValues(arr1,mesh1.getNumberOfCells(),9); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.inverse(); - f2.checkCoherency(); - self.assertEqual(9,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - expected1=[-2.6538108356290113, 2.855831037649208, -1.1111111111111067, 3.461891643709813, -4.775022956841121, 2.2222222222222143, -1.1111111111111054, 2.222222222222214, -1.1111111111111072] - for i in xrange(5): - self.assertAlmostEqual(expected1[0],f2.getIJ(i,0),13); - self.assertAlmostEqual(expected1[1],f2.getIJ(i,1),13); - self.assertAlmostEqual(expected1[2],f2.getIJ(i,2),13); - self.assertAlmostEqual(expected1[3],f2.getIJ(i,3),13); - self.assertAlmostEqual(expected1[4],f2.getIJ(i,4),13); - self.assertAlmostEqual(expected1[5],f2.getIJ(i,5),13); - self.assertAlmostEqual(expected1[6],f2.getIJ(i,6),13); - self.assertAlmostEqual(expected1[7],f2.getIJ(i,7),13); - self.assertAlmostEqual(expected1[8],f2.getIJ(i,8),13); - pass - # - array=DataArrayDouble.New(); - arr3=[7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5] - array.setValues(arr3,mesh1.getNumberOfCells(),6); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.inverse(); - f2.checkCoherency(); - self.assertEqual(6,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - expected3=[-0.3617705098531818, -0.8678630828458127, -0.026843764174972983, 0.5539957431465833, 0.13133439560823013, -0.05301294502145887] - for i in xrange(5): - self.assertAlmostEqual(expected3[0],f2.getIJ(i,0),13); - self.assertAlmostEqual(expected3[1],f2.getIJ(i,1),13); - self.assertAlmostEqual(expected3[2],f2.getIJ(i,2),13); - self.assertAlmostEqual(expected3[3],f2.getIJ(i,3),13); - self.assertAlmostEqual(expected3[4],f2.getIJ(i,4),13); - self.assertAlmostEqual(expected3[5],f2.getIJ(i,5),13); - pass - # - array=DataArrayDouble.New(); - arr2=[1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5] - array.setValues(arr2,mesh1.getNumberOfCells(),4); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.inverse(); - f2.checkCoherency(); - self.assertEqual(4,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - expected2=[-1.8595041322314059, 0.9504132231404963, 1.404958677685951, -0.49586776859504156] - for i in xrange(5): - self.assertAlmostEqual(expected2[0],f2.getIJ(i,0),13); - self.assertAlmostEqual(expected2[1],f2.getIJ(i,1),13); - self.assertAlmostEqual(expected2[2],f2.getIJ(i,2),13); - self.assertAlmostEqual(expected2[3],f2.getIJ(i,3),13); - pass - # - pass - - def testTrace1(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1, 1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1] - array.setValues(arr1,mesh1.getNumberOfCells(),9); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.trace(); - f2.checkCoherency(); - self.assertEqual(1,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - for i in xrange(5): - self.assertAlmostEqual(15.9,f2.getIJ(i,0),13); - pass - # - array=DataArrayDouble.New(); - arr3=[7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5, 7.8,8.9,9.1,10.2,23.4,34.5] - array.setValues(arr3,mesh1.getNumberOfCells(),6); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.trace(); - f2.checkCoherency(); - self.assertEqual(1,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - for i in xrange(5): - self.assertAlmostEqual(25.8,f2.getIJ(i,0),13); - pass - # - array=DataArrayDouble.New(); - arr2=[1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5, 1.2,2.3,3.4,4.5] - array.setValues(arr2,mesh1.getNumberOfCells(),4); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.trace(); - f2.checkCoherency(); - self.assertEqual(1,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - for i in xrange(5): - self.assertAlmostEqual(5.7,f2.getIJ(i,0),13); - pass - # - pass - - def testDeviator1(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7, 1.2,2.3,3.4,4.5,5.6,6.7] - array.setValues(arr1,mesh1.getNumberOfCells(),6); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.deviator(); - f2.checkCoherency(); - self.assertEqual(6,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - expected1=[-1.1,0.,1.1,4.5,5.6,6.7] - for i in xrange(5): - self.assertAlmostEqual(expected1[0],f2.getIJ(i,0),13); - self.assertAlmostEqual(expected1[1],f2.getIJ(i,1),13); - self.assertAlmostEqual(expected1[2],f2.getIJ(i,2),13); - self.assertAlmostEqual(expected1[3],f2.getIJ(i,3),13); - self.assertAlmostEqual(expected1[4],f2.getIJ(i,4),13); - self.assertAlmostEqual(expected1[5],f2.getIJ(i,5),13); - pass - # - pass - - def testMagnitude1(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[1.2,2.3,3.4,4.5,5.6, 1.2,2.3,3.4,4.5,5.6, 1.2,2.3,3.4,4.5,5.6, 1.2,2.3,3.4,4.5,5.6, 1.2,2.3,3.4,4.5,5.6] - array.setValues(arr1,mesh1.getNumberOfCells(),5); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.magnitude(); - f2.checkCoherency(); - self.assertEqual(1,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - for i in xrange(5): - self.assertAlmostEqual(8.3606219864313918,f2.getIJ(i,0),13); - pass - # - pass - - def testMaxPerTuple1(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[1.2,2.3,3.4,4.5,5.6, 1.2,3.4,4.5,5.6,2.3, 3.4,4.5,5.6,1.2,2.3, 5.6,1.2,2.3,3.4,4.5, 4.5,5.6,1.2,2.3,3.4] - array.setValues(arr1,mesh1.getNumberOfCells(),5); - f1.setArray(array); - f1.checkCoherency(); - # - f2=f1.maxPerTuple(); - f2.checkCoherency(); - self.assertEqual(1,f2.getNumberOfComponents()); - self.assertEqual(5,f2.getNumberOfTuples()); - for i in xrange(5): - self.assertAlmostEqual(5.6,f2.getIJ(i,0),13); - pass - # - pass - - def testChangeNbOfComponents(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[1.2,2.3,3.4,4.5,5.6, 1.2,3.4,4.5,5.6,2.3, 3.4,4.5,5.6,1.2,2.3, 5.6,1.2,2.3,3.4,4.5, 4.5,5.6,1.2,2.3,3.4] - array.setValues(arr1,mesh1.getNumberOfCells(),5); - f1.setArray(array); - f1.checkCoherency(); - # - f1.changeNbOfComponents(3,7.77); - f1.checkCoherency(); - self.assertEqual(3,f1.getNumberOfComponents()); - self.assertEqual(5,f1.getNumberOfTuples()); - expected1=[1.2,2.3,3.4, 1.2,3.4,4.5, 3.4,4.5,5.6, 5.6,1.2,2.3, 4.5,5.6,1.2] - for i in xrange(15): - self.assertAlmostEqual(expected1[i],f1.getIJ(0,i),13); - pass - f1.changeNbOfComponents(4,7.77); - f1.checkCoherency(); - self.assertEqual(4,f1.getNumberOfComponents()); - self.assertEqual(5,f1.getNumberOfTuples()); - expected2=[1.2,2.3,3.4,7.77, 1.2,3.4,4.5,7.77, 3.4,4.5,5.6,7.77, 5.6,1.2,2.3,7.77, 4.5,5.6,1.2,7.77] - for i in xrange(20): - self.assertAlmostEqual(expected2[i],f1.getIJ(0,i),13); - pass - # - pass - - def testSortPerTuple1(self): - mesh1=MEDCouplingDataForTest.build2DTargetMesh_1(); - f1=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - f1.setMesh(mesh1); - array=DataArrayDouble.New(); - arr1=[1.2,2.3,3.4,4.5,5.6, 1.2,3.4,4.5,5.6,2.3, 3.4,4.5,5.6,1.2,2.3, 5.6,1.2,2.3,3.4,4.5, 4.5,5.6,1.2,2.3,3.4] - array.setValues(arr1,mesh1.getNumberOfCells(),5); - f1.setArray(array); - f1.checkCoherency(); - # - f1.sortPerTuple(True); - f1.checkCoherency(); - self.assertEqual(5,f1.getNumberOfComponents()); - self.assertEqual(5,f1.getNumberOfTuples()); - for i in xrange(5): - self.assertAlmostEqual(arr1[0],f1.getIJ(i,0),13); - self.assertAlmostEqual(arr1[1],f1.getIJ(i,1),13); - self.assertAlmostEqual(arr1[2],f1.getIJ(i,2),13); - self.assertAlmostEqual(arr1[3],f1.getIJ(i,3),13); - self.assertAlmostEqual(arr1[4],f1.getIJ(i,4),13); - pass - # - f1.sortPerTuple(False); - f1.checkCoherency(); - self.assertEqual(5,f1.getNumberOfComponents()); - self.assertEqual(5,f1.getNumberOfTuples()); - for i in xrange(5): - self.assertAlmostEqual(arr1[4],f1.getIJ(i,0),13); - self.assertAlmostEqual(arr1[3],f1.getIJ(i,1),13); - self.assertAlmostEqual(arr1[2],f1.getIJ(i,2),13); - self.assertAlmostEqual(arr1[1],f1.getIJ(i,3),13); - self.assertAlmostEqual(arr1[0],f1.getIJ(i,4),13); - pass - # - pass def testKeepSetSelectedComponent1(self): arr1=[1.,2.,3.,4., 11.,12.,13.,14., 21.,22.,23.,24., 31.,32.,33.,34., 41.,42.,43.,44.] @@ -6049,7 +5642,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): for i in xrange(12): self.assertEqual(i,da1.getIJ(0,i)); # - self.assertRaises(da1.rearrange(7),InterpKernelException); + self.assertRaises(InterpKernelException,da1.rearrange,7); # da1.rearrange(12); self.assertEqual(12,da1.getNbOfElems()); @@ -6066,6 +5659,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): self.assertEqual(i,da1.getIJ(0,i)); #double da2=da1.convertToDblArr(); + st=da2.getHiddenCppPointer() # self.assertEqual(12,da2.getNbOfElems()); self.assertEqual(3,da2.getNumberOfComponents()); @@ -6084,10 +5678,10 @@ class MEDCouplingBasicsTest(unittest.TestCase): for i in xrange(12): self.assertAlmostEqual(float(i),da2.getIJ(0,i),14); # - self.assertRaises(da2.rearrange(7),InterpKernelException); + self.assertRaises(InterpKernelException,da2.rearrange,7); # da2.rearrange(1); - self.assertTrue(ptr2==da2.getConstPointer()); + self.assertEqual(st,da2.getHiddenCppPointer()) self.assertEqual(12,da2.getNbOfElems()); self.assertEqual(1,da2.getNumberOfComponents()); self.assertEqual(12,da2.getNumberOfTuples()); @@ -6102,7 +5696,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): self.assertAlmostEqual(float(i),da2.getIJ(0,i),14); pass - def testDARearrange1(self): + def testDARearrange2(self): da1=DataArrayInt.New(); arr=[1,2,3,2,2,3,5,1,5,5,2,2] da1.setValues(arr,4,3);