@@ -121,14 +121,10 @@ def test_protocol_compliance(self) -> None:
121121
122122 file_path = Path ("test.txt" )
123123 search_regex : RegexPattern = r"match"
124- budget = OutputBudget (limit = 1000 )
125-
126- result = list (mock_searcher .iter_matches (file_path , search_regex , budget ))
124+ result = list (mock_searcher .iter_matches (file_path , search_regex ))
127125
128126 assert result == expected_content
129- mock_searcher .iter_matches .assert_called_once_with (
130- file_path , search_regex , budget
131- )
127+ mock_searcher .iter_matches .assert_called_once_with (file_path , search_regex )
132128
133129 def test_regex_pattern_type_safety (self ) -> None :
134130 """Test RegexSearcher uses validated RegexPattern type."""
@@ -137,39 +133,10 @@ def test_regex_pattern_type_safety(self) -> None:
137133
138134 file_path = Path ("test.txt" )
139135 search_regex : RegexPattern = r"\d+" # Valid regex pattern
140- budget = OutputBudget (limit = 1000 )
141-
142- result = list (mock_searcher .iter_matches (file_path , search_regex , budget ))
136+ result = list (mock_searcher .iter_matches (file_path , search_regex ))
143137
144138 assert result == []
145- mock_searcher .iter_matches .assert_called_once_with (
146- file_path , search_regex , budget
147- )
148-
149- def test_budget_aware_streaming (self ) -> None :
150- """Test RegexSearcher respects budget constraints during streaming."""
151- mock_searcher = Mock (spec = RegexSearcher )
152- # Simulate budget-limited results
153- limited_content = [
154- FileContent (
155- path = Path ("test.txt" ),
156- contents = "first match" ,
157- window = FileWindow (line_offset = 0 , line_count = 1 ),
158- )
159- ]
160- mock_searcher .iter_matches = Mock (return_value = iter (limited_content ))
161-
162- file_path = Path ("test.txt" )
163- search_regex : RegexPattern = r"match"
164- budget = OutputBudget (limit = 50 ) # Limited budget
165-
166- result = list (mock_searcher .iter_matches (file_path , search_regex , budget ))
167-
168- assert len (result ) == 1
169- assert result [0 ].contents == "first match"
170- mock_searcher .iter_matches .assert_called_once_with (
171- file_path , search_regex , budget
172- )
139+ mock_searcher .iter_matches .assert_called_once_with (file_path , search_regex )
173140
174141 def test_consistent_parameter_naming (self ) -> None :
175142 """Test RegexSearcher uses consistent parameter naming (search_regex)."""
@@ -178,13 +145,9 @@ def test_consistent_parameter_naming(self) -> None:
178145
179146 file_path = Path ("test.txt" )
180147 search_regex : RegexPattern = r"pattern"
181- budget = OutputBudget (limit = 1000 )
182-
183148 # This test ensures the parameter is named 'search_regex', not 'pattern' or 'regex'
184- mock_searcher .iter_matches (file_path , search_regex , budget )
185- mock_searcher .iter_matches .assert_called_once_with (
186- file_path , search_regex , budget
187- )
149+ mock_searcher .iter_matches (file_path , search_regex )
150+ mock_searcher .iter_matches .assert_called_once_with (file_path , search_regex )
188151
189152
190153class TestProtocolIntegration :
@@ -204,8 +167,7 @@ def test_all_protocols_use_validated_types(self) -> None:
204167 mock_searcher .iter_matches = Mock (return_value = iter ([]))
205168
206169 regex_pattern : RegexPattern = r"\w+"
207- budget = OutputBudget (limit = 1000 )
208- mock_searcher .iter_matches (Path ("test.txt" ), regex_pattern , budget )
170+ mock_searcher .iter_matches (Path ("test.txt" ), regex_pattern )
209171
210172 # Verify type-safe calls completed without error
211173 assert True
@@ -226,7 +188,7 @@ def test_budget_consistency_across_protocols(self) -> None:
226188 # RegexSearcher uses OutputBudget
227189 mock_searcher = Mock (spec = RegexSearcher )
228190 mock_searcher .iter_matches = Mock (return_value = iter ([]))
229- mock_searcher .iter_matches (Path ("test.txt" ), r"pattern" , budget )
191+ mock_searcher .iter_matches (Path ("test.txt" ), r"pattern" )
230192
231193 # Verify both protocols accept the same OutputBudget instance
232194 assert True
0 commit comments