]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Ne pas remplacer XX.sort() par sorted(XXX) pour les classes MEDCoupling !
authorGilles DAVID <gilles-g.david@edf.fr>
Wed, 19 Apr 2017 11:42:40 +0000 (13:42 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Wed, 19 Apr 2017 11:42:40 +0000 (13:42 +0200)
src/MEDCoupling_Swig/MEDCouplingBasicsTest1.py
src/MEDLoader/Swig/MEDLoaderCouplingTrainingSession.py

index d3217183449858153f1b332d5051401f05b92454..7d7799c9ea58834d0b214e1c26166cf6516e576a 100644 (file)
@@ -2702,7 +2702,8 @@ class MEDCouplingBasicsTest1(unittest.TestCase):
         types=mesh.getAllGeoTypes();
         types.sort()
         self.assertEqual(5,len(types));
-        expected1=sorted([NORM_POLYGON, NORM_TRI3, NORM_QUAD4, NORM_TRI6, NORM_QUAD8])
+        expected1 = [NORM_POLYGON, NORM_TRI3, NORM_QUAD4, NORM_TRI6, NORM_QUAD8]
+        expected1.sort()
         self.assertEqual(expected1,types);
         self.assertTrue(mesh.isPresenceOfQuadratic());
         self.assertEqual(62,mesh.getNodalConnectivityArrayLen());
index 031143bd522a9e972cbc71ce926385f78633425e..3d14d550c5e47b56a040e7727a870adfe6827d70 100644 (file)
@@ -107,7 +107,8 @@ mesh3D.getCoords()[:]*=100.
 mesh3D.getCoords().setInfoOnComponents(["X [cm]","Y [cm]","Z [cm]"])
 #
 zLev=mesh3D.getCoords()[:,2]
-zLev=sorted(zLev.getDifferentValues(1e-12))
+zLev = zLev.getDifferentValues(1e-12)
+zLev.sort()
 #
 tmp,cellIdsSol1=mesh3D.buildSlice3D([0.,0.,(zLev[1]+zLev[2])/2],[0.,0.,1.],1e-12)
 bary=mesh3D.computeCellCenterOfMass()