def test_ts_append_outoforder(self): t = Track() nose.tools.assert_true(t.append(TrackState(10))) nose.tools.assert_false(t.append(TrackState(10))) nose.tools.assert_false(t.append(TrackState(9))) nose.tools.assert_false(t.append(TrackState(0))) nose.tools.assert_false(t.append(TrackState(-1))) nose.tools.assert_true(t.append(TrackState(11))) nose.tools.assert_false(t.append(TrackState(11))) # After all that there should only be two states in there for frames 10 # and 11. nose.tools.assert_equal(t.size, 2) nose.tools.assert_equal(len(t), 2) nose.tools.assert_equal(t.all_frame_ids(), {10, 11})
def test_ts_append_outoforder(self): t = Track() nose.tools.assert_true(t.append(TrackState(10))) nose.tools.assert_false(t.append(TrackState(10))) nose.tools.assert_false(t.append(TrackState(9))) nose.tools.assert_false(t.append(TrackState(0))) nose.tools.assert_false(t.append(TrackState(-1))) nose.tools.assert_true(t.append(TrackState(11))) nose.tools.assert_false(t.append(TrackState(11))) # After all that there should only be two states in there for frames 10 # and 11. nose.tools.assert_equal(t.size, 2) nose.tools.assert_equal(len(t), 2) nose.tools.assert_equal(t.all_frame_ids(), {10, 11})
def test_initial_all_frame_ids(self): t = Track() s = t.all_frame_ids() nose.tools.assert_equal(len(s), 0)
def test_initial_all_frame_ids(self): t = Track() s = t.all_frame_ids() nose.tools.assert_equal(len(s), 0)