Skip to content

Commit 83c3f0b

Browse files
committed
Merge branch 'lukaskrodinger/fix-ls-infinit-loop'
* lukaskrodinger/fix-ls-infinit-loop: Prevent infinite loop by consulting timer in local search statement
2 parents b3fc89a + 4e86c4d commit 83c3f0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pynguin/testcase/localsearchstatement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def replace_chars(self) -> bool:
553553
for i in range(len(statement.value) - 1, -1, -1):
554554
finished = False
555555

556-
while not finished:
556+
while not finished and not self._timer.limit_reached():
557557
finished = True
558558
old_value = statement.value
559559
if self.iterate_string(statement, i, 1):

0 commit comments

Comments
 (0)