Salome HOME
Merge branch 'rnv/win_swig_generation' of salome:tools/medcoupling into rnv/win_swig_...
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingPickleTest.py
index 6e99259a34940e62b056ad319f5ca43a86b2714c..a34420d8a2580c073fe36a85ef08efefc77d9f96 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- 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
@@ -292,6 +292,20 @@ class MEDCouplingPickleTest(unittest.TestCase):
         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