def test_str(self): for ptype in src._ptypes: if ptype == 'ram': obj = src.SourcePath(data={'data': None}, ptype=ptype) else: obj = src.SourcePath(data=None, ptype=ptype) str_ = str(obj)
def test_accept(self): assert src.OrbitEphemerisMessageSource.accept(self.path) with self.assertRaises(TypeError): src.OrbitEphemerisMessageSource.accept(None) assert not src.OrbitEphemerisMessageSource.accept( src.SourcePath(data=data_dir + '/tracklet.tdm', ptype='file')) assert not src.OrbitEphemerisMessageSource.accept( src.SourcePath(data={'data': None}, ptype='ram'))
def test_accept(self): assert src.RadarTrackingDataMessage.accept(self.path) with self.assertRaises(TypeError): src.RadarTrackingDataMessage.accept(None) assert not src.RadarTrackingDataMessage.accept( src.SourcePath(data=data_dir + '/state.oem', ptype='file')) assert not src.RadarTrackingDataMessage.accept( src.SourcePath(data={'data': None}, ptype='ram'))
def setUp(self): self.path = src.SourcePath(data=data_dir + '/state.oem', ptype='file')
def test_init(self): for ptype in src._ptypes: obj = src.SourcePath(data=None, ptype=ptype) with self.assertRaises(TypeError): obj = src.SourcePath(data=None, ptype='This type does not exist')
def setUp(self): self.path = src.SourcePath(data=data_dir + '/tracklet.tdm', ptype='file')