# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+# Copyright (C) 2007-2016 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
tmpIds=f.getCellIdsHavingGaussLocalization(0);
self.assertEqual(ids2,list(tmpIds.getValues()));
self.assertRaises(InterpKernelException,f.checkConsistencyLight);#<- it's always not ok because undelying array not with the good size.
- array2=f.getArray().substr(0,10);
+ array2=f.getArray().subArray(0,10);
f.setArray(array2);
f.checkConsistencyLight();
####
self.assertEqual(e2.what(),eStr)
pass
+ @unittest.skipUnless(MEDCouplingHasNumPyBindings(),"requires numpy")
+ def test14(self):
+ """Pickelization of DataArrayBytes"""
+ x=DataArrayByte(256,1)
+ for i in xrange(256):
+ x[i]=-128+i
+ pass
+ x.rearrange(2) ; x.setInfoOnComponents(["aa","bbb"])
+ x.setName("toto")
+ st=cPickle.dumps(x,cPickle.HIGHEST_PROTOCOL)
+ x2=cPickle.loads(st)
+ self.assertTrue(x2.isEqual(x))
+ pass
+
def setUp(self):
pass
pass