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