def test_auto_id():
    'Tests auto_id option.'
    acc = mm.MOTAccumulator(auto_id=True)
    acc.update([1, 2, 3, 4], [], [])
    acc.update([1, 2, 3, 4], [], [])
    assert (acc.events.index.levels[0][(- 1)] == 1)
    acc.update([1, 2, 3, 4], [], [])
    assert (acc.events.index.levels[0][(- 1)] == 2)
    with pytest.raises(AssertionError):
        acc.update([1, 2, 3, 4], [], [], frameid=5)
    acc = mm.MOTAccumulator(auto_id=False)
    with pytest.raises(AssertionError):
        acc.update([1, 2, 3, 4], [], [])
Tests auto_id option.
def test_auto_id():
    
    acc = mm.MOTAccumulator(auto_id=True)
    acc.update([1, 2, 3, 4], [], [])
    acc.update([1, 2, 3, 4], [], [])
    assert (acc.events.index.levels[0][(- 1)] == 1)
    acc.update([1, 2, 3, 4], [], [])
    assert (acc.events.index.levels[0][(- 1)] == 2)
    with pytest.raises(AssertionError):
        acc.update([1, 2, 3, 4], [], [], frameid=5)
    acc = mm.MOTAccumulator(auto_id=False)
    with pytest.raises(AssertionError):
        acc.update([1, 2, 3, 4], [], [])