示例#1
0
def test_purify_tracklets(fake_tracklet):
    fake_tracklet.data = np.full_like(fake_tracklet.data, np.nan)
    assert TrackletStitcher.purify_tracklet(fake_tracklet) is None
    fake_tracklet.data[0] = 1
    tracklet = TrackletStitcher.purify_tracklet(fake_tracklet)
    assert len(tracklet) == 1
    assert tracklet.inds == fake_tracklet.inds[0]
示例#2
0
def test_purify_tracklets(tracklet):
    tracklet.data = np.full_like(tracklet.data, np.nan)
    assert TrackletStitcher.purify_tracklet(tracklet) is None
    tracklet.data[0] = 1
    tracklet_pure = TrackletStitcher.purify_tracklet(tracklet)
    assert len(tracklet_pure) == 1
    assert tracklet_pure.inds == tracklet.inds[0]