Exemple #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()]
Exemple #2
0
def test_size(trie_dict, size):
    tree = Tree(None, None, None)
    tree._dict = trie_dict
    tree.digest()
    assert tree.size == size
Exemple #3
0
def test_nfiles(trie_dict, nfiles):
    tree = Tree(None, None, None)
    tree._dict = trie_dict
    assert len(tree) == nfiles
Exemple #4
0
def test_items(trie_dict):
    tree = Tree(None, None, None)
    tree._dict = trie_dict
    assert list(tree) == list(trie_dict.items())