@@ -146,12 +146,6 @@ def start_implementing_frid(self):
146146 else :
147147 frid = plain_spec .get_next_frid (self .plain_source_tree , self .frid_context .frid )
148148
149- if frid is None :
150- # If frid context is empty, it means that all frids have been implemented
151- self .frid_context = None
152- self .machine .dispatch (triggers .PREPARE_FINAL_OUTPUT )
153- return
154-
155149 specifications , _ = plain_spec .get_specifications_for_frid (self .plain_source_tree , frid )
156150 functional_requirement_text = specifications [plain_spec .FUNCTIONAL_REQUIREMENTS ][- 1 ]
157151
@@ -172,10 +166,6 @@ def start_implementing_frid(self):
172166 return
173167
174168 def check_frid_iteration_limit (self ):
175- # If frid context is not set, it means that all frids have been implemented
176- if self .frid_context is None :
177- return
178-
179169 if self .frid_context .functional_requirement_render_attempts >= MAX_CODE_GENERATION_RETRIES :
180170 error_msg = f"Unittests could not be fixed after rendering the functionality { self .frid_context .frid } for the { MAX_CODE_GENERATION_RETRIES } times."
181171 self .dispatch_error (error_msg )
@@ -189,6 +179,9 @@ def check_frid_iteration_limit(self):
189179 f"Restarting rendering the functionality { self .frid_context .frid } from scratch."
190180 )
191181
182+ def has_next_frid (self ) -> bool :
183+ return plain_spec .get_next_frid (self .plain_source_tree , self .frid_context .frid ) is not None
184+
192185 def finish_implementing_frid (self ):
193186 self .functional_requirements_render_attempts_failed_unit_during_conformance_tests = 0
194187 self .run_state .increment_rendered_functionalities ()
0 commit comments