def test_load_and_save_averaged_crosssp(self): pds = AveragedCrossspectrum() pds.freq = np.linspace(0, 10, 15) pds.power = np.random.poisson(30, 15) pds.mjdref = 54385.3254923845 pds.gti = np.longdouble([[-0.5, 3.5]]) pds.m = 2 save_to_intermediate_file(pds, self.dum) pds2 = load_from_intermediate_file(self.dum) assert np.allclose(pds.gti, pds2.gti) assert np.allclose(pds.mjdref, pds2.mjdref) assert np.allclose(pds.gti, pds2.gti) assert pds.m == pds2.m