X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FSwig%2FMEDLoaderTest4.py;h=1e4cb28104a70f03d748abfd9cccc8d1f938ff6e;hb=aafcf704892f03308a84407e898d9e8b19496a1c;hp=13d291198fdd8638154d4e8088ee9b978139baa1;hpb=b307fa3ee9c6d9e08082e2ccc832b28a17fd6d2c;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/Swig/MEDLoaderTest4.py b/src/MEDLoader/Swig/MEDLoaderTest4.py index 13d291198..1e4cb2810 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest4.py +++ b/src/MEDLoader/Swig/MEDLoaderTest4.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2021 CEA/DEN, EDF R&D +# Copyright (C) 2007-2022 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 @@ -5627,6 +5627,25 @@ class MEDLoaderTest4(unittest.TestCase): self.assertTrue(v.isEqual(DataArrayDouble([0.0]),1e-14)) pass + @WriteInTmpDir + def test43(self): + """ + EDF23724 : point to error during 64bit convertion into medcoupling a DataArrayMedInt class was created. + This class is not dynamic_castable to DataArrayInt32 nor DataArrayInt64. It lead previously to strange behaviour + """ + fname = "tessss.med" + arr=DataArrayDouble(10) ; arr.iota() + m = MEDCouplingCMesh() ; m.setCoords(arr) + m = m.buildUnstructured() + m.setName("mesh") + mm = MEDFileUMesh() ; mm[0] = m + mm.setGlobalNumFieldAtLevel(1,DataArrayInt([0,4,5,6,10,12,16,17,19,20])) + mm.write(fname,2) + mm_reload = MEDFileMesh.New(fname) + # DataArrayMedInt class no more exists. Check that. + self.assertNotEqual(mm_reload.getGlobalNumFieldAtLevel(1).getClassName() , "DataArrayMedInt") + pass + pass if __name__ == "__main__":