From: ageay Date: Fri, 22 Mar 2013 07:32:38 +0000 (+0000) Subject: Additionnal little test to check the possibility to remove names in MEDFileMesh DS. X-Git-Tag: V6_main_FINAL~249 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=05502ef6668ee78b668b33f67c1e725d25779f89;p=tools%2Fmedcoupling.git Additionnal little test to check the possibility to remove names in MEDFileMesh DS. --- diff --git a/src/MEDLoader/Swig/MEDLoaderTest3.py b/src/MEDLoader/Swig/MEDLoaderTest3.py index 0a1746a54..2e5247f59 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest3.py +++ b/src/MEDLoader/Swig/MEDLoaderTest3.py @@ -2098,6 +2098,17 @@ class MEDLoaderTest(unittest.TestCase): self.assertTrue(mm.isEqual(mmr,1e-12)[0]) mmCpy=mm.deepCpy() self.assertTrue(mm.isEqual(mmCpy,1e-12)[0]) + # remove names on nodes + mmCpy.setNameFieldAtLevel(1,None) + self.assertTrue(not mm.isEqual(mmCpy,1e-12)[0]) + mm.setNameFieldAtLevel(1,None) + self.assertTrue(mm.isEqual(mmCpy,1e-12)[0]) + mm.setNameFieldAtLevel(-1,None) + mm.write(fname,2) + mmr=MEDFileMesh.New(fname) + self.assertEqual(mmr.getNameFieldAtLevel(1),None) + self.assertTrue(mmr.getNameFieldAtLevel(0).isEqual(DataArrayAsciiChar(["CellL0#%.3d "%(i) for i in xrange(6)]))) + self.assertEqual(mmr.getNameFieldAtLevel(-1),None) # c=MEDCouplingCMesh() arr=DataArrayDouble([0.,1.1,2.3])