Esempio n. 1
0
def test_find_keyerror():
    dt = Dictree()
    dt[2, 3] = 0
    dt[WILDCARD, 1, 2] = 1
    dt[WILDCARD, 2, 3] = 2
    raises_keyerror(lambda: dt.find((1, 1)), (1, 1))
    raises_keyerror(lambda: dt.find((1, 1, 2, 3)), (1, 1, 2, 3))
Esempio n. 2
0
def test_find():
    dt = Dictree()
    dt[1, 2] = 1
    assert dt.find((1, 2)) == (1, (False, False))