@@ -22,37 +22,37 @@ def test_search_existing_patterns(self) -> None:
2222 patterns = ["ana" , "ban" , "na" ]
2323 for pattern in patterns :
2424 with self .subTest (pattern = pattern ):
25- assert self .suffix_tree .search (pattern ), (
26- f"Pattern ' { pattern } ' should be found."
27- )
25+ assert self .suffix_tree .search (
26+ pattern
27+ ), f"Pattern ' { pattern } ' should be found."
2828
2929 def test_search_non_existing_patterns (self ) -> None :
3030 """Test searching for patterns that do not exist in the suffix tree."""
3131 patterns = ["xyz" , "apple" , "cat" ]
3232 for pattern in patterns :
3333 with self .subTest (pattern = pattern ):
34- assert not self .suffix_tree .search (pattern ), (
35- f"Pattern ' { pattern } ' should not be found."
36- )
34+ assert not self .suffix_tree .search (
35+ pattern
36+ ), f"Pattern ' { pattern } ' should not be found."
3737
3838 def test_search_empty_pattern (self ) -> None :
3939 """Test searching for an empty pattern."""
4040 assert self .suffix_tree .search ("" ), "An empty pattern should be found."
4141
4242 def test_search_full_text (self ) -> None :
4343 """Test searching for the full text."""
44- assert self .suffix_tree .search (self . text ), (
45- "The full text should be found in the suffix tree."
46- )
44+ assert self .suffix_tree .search (
45+ self . text
46+ ), "The full text should be found in the suffix tree."
4747
4848 def test_search_substrings (self ) -> None :
4949 """Test searching for substrings of the full text."""
5050 substrings = ["ban" , "ana" , "a" , "na" ]
5151 for substring in substrings :
5252 with self .subTest (substring = substring ):
53- assert self .suffix_tree .search (substring ), (
54- f"Substring ' { substring } ' should be found."
55- )
53+ assert self .suffix_tree .search (
54+ substring
55+ ), f"Substring ' { substring } ' should be found."
5656
5757
5858if __name__ == "__main__" :
0 commit comments