@@ -0,0 +1,1013 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A%22%22%22 Check if pickle can serialize seabird's data objects%0A%0A%22%22%22%0A%0Aimport os%0Afrom glob import glob%0Aimport pickle%0A%0Aimport numpy as np%0A%0Afrom seabird import cnv%0A%0A%0Adef test_serialize_CNV():%0A        %22%22%22 Serialize CNV%0A        %22%22%22%0A        datadir = os.path.join(os.path.dirname(__file__), 'test_data')%0A        for f in glob(os.path.join(datadir, %22*.cnv.OK%22)):%0A            profile = cnv.CNV(open(f).read())%0A            profile2 = pickle.loads(pickle.dumps(profile))%0A            assert profile.attributes == profile2.attributes%0A            assert (profile.data == profile.data)%0A%0A%0Adef test_serialize_fCNV():%0A        %22%22%22 Serialize fCNV%0A        %22%22%22%0A        datadir = os.path.join(os.path.dirname(__file__), 'test_data')%0A        for f in glob(os.path.join(datadir, %22*.cnv.OK%22)):%0A            profile = cnv.fCNV(f)%0A            profile2 = pickle.loads(pickle.dumps(profile))%0A            assert profile.attributes == profile2.attributes%0A            assert (profile.data == profile.data)%0A

Test if pickle can serialize CNV/fCNV