X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FSwig%2FMEDLoaderTest.py;h=38ee4afa9671e1d4251aa830e5644ab2fb5b6a13;hb=b6c89e5886e9b348c00d3d6c23a265f89613cbc7;hp=bfd1b3bbe27195e7cece51797fedc4fa205fa6f4;hpb=00794e8127b6e947edaac07f96b17da6eaf70f1a;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/Swig/MEDLoaderTest.py b/src/MEDLoader/Swig/MEDLoaderTest.py index bfd1b3bbe..38ee4afa9 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest.py +++ b/src/MEDLoader/Swig/MEDLoaderTest.py @@ -1,10 +1,10 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 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 @@ -315,6 +315,7 @@ class MEDLoaderTest(unittest.TestCase): fileName="Pyfile14.med"; f1=MEDLoaderDataForTest.buildVecFieldOnGaussNE_1(); MEDLoader.MEDLoader.WriteField(fileName,f1,True); + self.assertEqual([MEDLoader.ON_GAUSS_NE],MEDLoader.MEDLoader.GetTypesOfField(fileName,'2DMesh_2','MyFieldOnGaussNE')) #Bug 22/5/2014 f2=MEDLoader.MEDLoader.ReadField(MEDLoader.ON_GAUSS_NE,fileName,f1.getMesh().getName(),0,f1.getName(),1,5); self.assertTrue(f1.isEqual(f2,1e-12,1e-12)); pass @@ -691,7 +692,7 @@ class MEDLoaderTest(unittest.TestCase): d.alloc(1,1) d.iota(1.) # seting a long name - d.setInfoOnComponent(0,"CONCENTRATION of I129") + d.setInfoOnComponent(0,"CONCENTRATION of I129") f.setArray(d) f.setName("field") # @@ -751,4 +752,5 @@ class MEDLoaderTest(unittest.TestCase): pass pass -unittest.main() +if __name__ == "__main__": + unittest.main()