示例#1
0
 def test_retrieve_ev_data_no_attrs(self):
     ev = _retrieveDataEV(data_path=genDataPath(self.ev_path_noattrs))
     assert ev.mjdref == 0
     assert ev.pi is None
     assert ev.energy is None
     assert ev.gti is None
     assert ev.notes == ""
示例#2
0
 def test_retrieve_ev_data_raw(self):
     res = _retrieveDataEV(data_path=genDataPath(self.ev_path_noattrs),
                           raw=True)
     times, energy, ncounts, mjdref, dt, gti, pi, notes = res
     assert mjdref == 0
     assert pi is None
     assert energy is None
     assert gti is None
     assert notes == ""
示例#3
0
 def test_retrieve_lc_data_bad_offset(self):
     with pytest.raises(ValueError) as excinfo:
         _ = _retrieveDataLC(data_path=genDataPath(self.lc_path),
                             offset=101010101010)
     assert "Offset cannot be larger than size of " in str(excinfo.value)