コード例 #1
0
ファイル: test_trie.py プロジェクト: alexmic/geotrie-python
 def test_whole_key_as_prefix(self):
     trie = Trie()
     trie.add('foobar', 1)
     assert trie.has_prefix('foobar')
コード例 #2
0
ファイル: test_trie.py プロジェクト: alexmic/geotrie-python
 def test_key_does_not_exist(self):
     trie = Trie()
     assert not trie.has_prefix('foobar')
コード例 #3
0
ファイル: test_trie.py プロジェクト: alexmic/geotrie-python
 def test_prefix_exists(self):
     trie = Trie()
     trie.add('foobar', 1)
     assert trie.has_prefix('foo')