MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / test

Function test

data_structures/trie/trie.py:65–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63
64
65def test():
66 words = ['banana', 'bananas', 'bandana', 'band', 'apple', 'all', 'beast']
67 root = TrieNode()
68 root.insert_many(words)
69 # print_words(root, '')
70 assert root.find('banana')
71 assert not root.find('bandanas')
72 assert not root.find('apps')
73 assert root.find('apple')
74
75test()

Callers 1

trie.pyFile · 0.70

Calls 3

insert_manyMethod · 0.95
findMethod · 0.95
TrieNodeClass · 0.85

Tested by

no test coverage detected