test(agent): drop duplicated back-to-back restart tail and fix test name
The tail of test_response_between_restarts_resets_the_bound re-ran the restart_count=0 -> MAX_RETRIES continues -> break sequence that the neighbouring bound test already asserts (with refunds, exit reason and steer checks), so it was a copy-paste duplicate. Remove it. The bound now means "restarts since the last response", not "per turn", so rename test_restart_refunds_are_bounded_per_turn to test_back_to_back_restart_refunds_are_bounded to match.
This commit is contained in:
@@ -53,7 +53,7 @@ def test_single_restart_still_reissues_the_iteration(flag):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("flag", RESTART_FLAGS)
|
||||
def test_restart_refunds_are_bounded_per_turn(flag):
|
||||
def test_back_to_back_restart_refunds_are_bounded(flag):
|
||||
"""Re-arming the flag every iteration breaks after ``max_retries`` refunds instead of
|
||||
refunding forever (the turn ends, so the session turn lease is released)."""
|
||||
agent = _agent()
|
||||
@@ -112,7 +112,3 @@ def test_response_between_restarts_resets_the_bound(flag):
|
||||
restart_count = verdict.restart_count
|
||||
assert actions == ["continue"] * (3 * MAX_RETRIES)
|
||||
assert agent.steered == []
|
||||
# Back-to-back restarts with no response in between still hit the cap.
|
||||
for _ in range(MAX_RETRIES):
|
||||
restart_count = _apply(agent, flag, restart_count).restart_count
|
||||
assert _apply(agent, flag, restart_count).action == "break"
|
||||
|
||||
Reference in New Issue
Block a user