File: aatree_test.py

package info (click to toggle)
sugar-pippy-activity 36~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 792 kB
  • ctags: 632
  • sloc: python: 3,776; makefile: 16
file content (16 lines) | stat: -rw-r--r-- 224 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from aatree import *
x = TreeList()
y = AATreeList()

def test(a):
    a[0] = 1
    a[1] = 2
    a[2] = 3
    a[3] = 4
    a[1] = 'b'
    del a[2]
    assert a.index('b') == 1
    assert a.index(4) == 2
    
test(x)
test(y)