Ejemplo n.º 1
0
def test_items(trie_dict):
    tree = Tree(None, None, None)
    tree._dict = trie_dict
    assert list(tree) == [(key, value[0], value[1])
                          for key, value in trie_dict.items()]
Ejemplo n.º 2
0
def test_size(trie_dict, size):
    tree = Tree(None, None, None)
    tree._dict = trie_dict
    tree.digest()
    assert tree.size == size
Ejemplo n.º 3
0
def test_nfiles(trie_dict, nfiles):
    tree = Tree(None, None, None)
    tree._dict = trie_dict
    assert len(tree) == nfiles
Ejemplo n.º 4
0
def test_items(trie_dict):
    tree = Tree(None, None, None)
    tree._dict = trie_dict
    assert list(tree) == list(trie_dict.items())