X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FSwig%2FMEDLoaderExamplesTest.py;h=d7b6aa4cb9a2d5495b9ffeabe454c56616797088;hb=0b187729ac99d3e9e9bb9d2be8cb8600a783be6c;hp=f9b2651112a0f2d446f4b14d85d492a189ef0fc2;hpb=10f37bf6f33a762626d7f1093b2f5450c1688667;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/Swig/MEDLoaderExamplesTest.py b/src/MEDLoader/Swig/MEDLoaderExamplesTest.py index f9b265111..d7b6aa4cb 100644 --- a/src/MEDLoader/Swig/MEDLoaderExamplesTest.py +++ b/src/MEDLoader/Swig/MEDLoaderExamplesTest.py @@ -1,10 +1,10 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2012 CEA/DEN, EDF R&D +# Copyright (C) 2007-2015 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,9 +17,11 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# Author : Anthony Geay (CEA/DEN) from MEDLoader import * import unittest +import os class MEDLoaderBasicsTest(unittest.TestCase): def testExampleReadFieldOnAllEntity1(self): @@ -163,10 +165,11 @@ class MEDLoaderBasicsTest(unittest.TestCase): myMesh.setName(meshName) MEDLoader.WriteUMesh("wFile1.med",myMesh,True) #! [PySnippetMeshAdvAPI1_1] + os.remove("wFile1.med") #! [PySnippetMeshAdvAPI1_2] self.assertTrue(isinstance(myMesh,MEDCouplingUMesh)) myMesh.setName(meshName) - MEDLoader.WriteUMesh("wFile1.med",myMesh,True) + MEDLoader.WriteUMesh("wFile1.med",myMesh,False) #! [PySnippetMeshAdvAPI1_2] f=myMesh.getMeasureField(ON_CELLS) f=f.buildNewTimeReprFromThis(ONE_TIME,False)