def test_suffix_empty_trie(self):
     """
     Tests suffix operations on an empty trie.
     """
     trie = naive_suffix_trie.build_suffix_trie("")
     assert naive_suffix_trie.suffix(trie, "")
     assert not naive_suffix_trie.suffix(trie, "a")
 def test_suffix_single_element_trie(self):
     """
     Tests suffix operations on a single element trie.
     """
     trie = naive_suffix_trie.build_suffix_trie("a")
     assert naive_suffix_trie.suffix(trie, "")
     assert naive_suffix_trie.suffix(trie, "a")
     assert not naive_suffix_trie.suffix(trie, "b")
 def test_suffix_multi_element_trie(self):
     """
     Tests suffix operations on a multi-element trie.
     """
     trie = naive_suffix_trie.build_suffix_trie("abba")
     expected = ["", "a", "ba", "bba", "abba"]
     unexpected = ["ab", "abb"]
     for val in expected:
         assert naive_suffix_trie.suffix(trie, val)
     for val in unexpected:
         assert not naive_suffix_trie.suffix(trie, val)
 def test_build_empty_suffix_trie(self):
     """
     Tests building an empty suffix trie.
     """
     naive_suffix_trie.build_suffix_trie("")
 def test_build_multi_element_suffix_trie(self):
     """
     Tests building a multi-element suffix trie.
     """
     naive_suffix_trie.build_suffix_trie("abc")
 def test_build_single_element_suffix_trie(self):
     """
     Tests building a single-element suffix trie.
     """
     naive_suffix_trie.build_suffix_trie("a")