コード例 #1
0
 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)
コード例 #2
0
 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'))
コード例 #3
0
 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'))
コード例 #4
0
 def setUp(self):
     self.path = src.SourcePath(data=data_dir + '/state.oem', ptype='file')
コード例 #5
0
    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')
コード例 #6
0
 def setUp(self):
     self.path = src.SourcePath(data=data_dir + '/tracklet.tdm',
                                ptype='file')