コード例 #1
0
 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)
コード例 #2
0
 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)