def test_extend():
    slt = SortedList(load=17)

    slt.extend(range(100))
    slt._check()

    slt.extend(list(range(100, 200)))
    slt._check()

    for val in range(200, 300):
        del slt._index[:]
        slt._build_index()
        slt.extend([val] * (val - 199))
        slt._check()
Example #2
0
def test_build_index():
    slt = SortedList([0])
    slt._reset(4)
    slt._build_index()
    slt._check()
Example #3
0
def test_build_index():
    slt = SortedList([0], load=4)
    slt._build_index()
    slt._check()
def test_build_index():
    slt = SortedList([0], load=4)
    slt._build_index()
    slt._check()
def test_build_index():
    slt = SortedList([0])
    slt._reset(4)
    slt._build_index()
    slt._check()