def test_readTim(self, tim_data, tim_header): myTim = TimeSeries(tim_data, Header(tim_header)) outfile = myTim.toFile() mynewTim = TimeSeries.readTim(filename=outfile) assert mynewTim.header.nbits == 32 assert mynewTim.header.source_name == "test" np.testing.assert_allclose(np.mean(mynewTim), 128, atol=0.1) os.remove(outfile)
def test_toFile(self, tim_data, tim_header): myTim = TimeSeries(tim_data, Header(tim_header)) outfile = myTim.toFile() assert os.path.isfile(outfile) os.remove(outfile)