fix(tui): update tests for renamed Anthropic model names and fix typer.Exit propagation
CI / push-validation (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 45s
CI / lint (pull_request) Successful in 1m9s
CI / typecheck (pull_request) Successful in 1m22s
CI / quality (pull_request) Successful in 1m21s
CI / security (pull_request) Successful in 1m30s
CI / integration_tests (pull_request) Successful in 3m20s
CI / unit_tests (pull_request) Successful in 4m57s
CI / docker (pull_request) Successful in 1m26s
CI / coverage (pull_request) Successful in 11m3s
CI / status-check (pull_request) Successful in 3s
CI / push-validation (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 45s
CI / lint (pull_request) Successful in 1m9s
CI / typecheck (pull_request) Successful in 1m22s
CI / quality (pull_request) Successful in 1m21s
CI / security (pull_request) Successful in 1m30s
CI / integration_tests (pull_request) Successful in 3m20s
CI / unit_tests (pull_request) Successful in 4m57s
CI / docker (pull_request) Successful in 1m26s
CI / coverage (pull_request) Successful in 11m3s
CI / status-check (pull_request) Successful in 3s
This commit is contained in:
@@ -167,7 +167,7 @@ def step_resolve_with_no_config_data(context: Any) -> None:
|
||||
try:
|
||||
resolve_config_files("local/empty-actor", [])
|
||||
context.resolve_exit_code = 0
|
||||
except (SystemExit, click.exceptions.Exit) as exc:
|
||||
except (SystemExit, click.exceptions.Exit, typer.Exit) as exc:
|
||||
context.resolve_exit_code = getattr(
|
||||
exc, "exit_code", getattr(exc, "code", 1)
|
||||
)
|
||||
@@ -211,7 +211,7 @@ def step_resolve_unknown_actor_directly(context: Any) -> None:
|
||||
try:
|
||||
resolve_config_files("nonexistent/actor", [])
|
||||
context.resolve_exit_code = 0
|
||||
except (SystemExit, click.exceptions.Exit) as exc:
|
||||
except (SystemExit, click.exceptions.Exit, typer.Exit) as exc:
|
||||
context.resolve_exit_code = getattr(
|
||||
exc, "exit_code", getattr(exc, "code", 1)
|
||||
)
|
||||
@@ -262,7 +262,7 @@ def step_resolve_with_empty_config_blob(context: Any) -> None:
|
||||
try:
|
||||
resolve_config_files("local/empty-blob-actor", [])
|
||||
context.resolve_exit_code = 0
|
||||
except (SystemExit, click.exceptions.Exit) as exc:
|
||||
except (SystemExit, click.exceptions.Exit, typer.Exit) as exc:
|
||||
context.resolve_exit_code = getattr(
|
||||
exc, "exit_code", getattr(exc, "code", 1)
|
||||
)
|
||||
@@ -358,7 +358,7 @@ def step_resolve_with_unserializable_config_blob(context: Any) -> None:
|
||||
try:
|
||||
resolve_config_files("local/bad-blob-actor", [])
|
||||
context.resolve_exit_code = 0
|
||||
except (SystemExit, click.exceptions.Exit) as exc:
|
||||
except (SystemExit, click.exceptions.Exit, typer.Exit) as exc:
|
||||
context.resolve_exit_code = getattr(
|
||||
exc, "exit_code", getattr(exc, "code", 1)
|
||||
)
|
||||
|
||||
@@ -49,7 +49,7 @@ def step_resolve_with_control_character_name(context: Any) -> None:
|
||||
try:
|
||||
resolve_config_files(actor_name, [])
|
||||
context.resolve_exit_code = 0
|
||||
except (SystemExit, click.exceptions.Exit) as exc:
|
||||
except (SystemExit, click.exceptions.Exit, typer.Exit) as exc:
|
||||
context.resolve_exit_code = getattr(
|
||||
exc, "exit_code", getattr(exc, "code", 1)
|
||||
)
|
||||
|
||||
@@ -485,6 +485,6 @@ def step_persona_bar_reflects_actor(context: object) -> None:
|
||||
from cleveragents.tui.widgets.persona_bar import PersonaBar
|
||||
|
||||
bar = context._first_run_app.query_one("#persona-bar", PersonaBar)
|
||||
assert "anthropic/claude-4-sonnet" in bar._text, (
|
||||
assert "anthropic/claude-sonnet-4-20250514" in bar._text, (
|
||||
f"Expected actor in persona bar, got: {bar._text}"
|
||||
)
|
||||
|
||||
@@ -82,7 +82,7 @@ Feature: TUI first-run experience with actor selection overlay
|
||||
Scenario: ActorSelectionOverlay show populates default actors
|
||||
Given a new ActorSelectionOverlay
|
||||
When I call show on the overlay
|
||||
Then the overlay actors list should contain "anthropic/claude-4-sonnet"
|
||||
Then the overlay actors list should contain "anthropic/claude-sonnet-4-20250514"
|
||||
|
||||
Scenario: ActorSelectionOverlay show accepts custom actor list
|
||||
Given a new ActorSelectionOverlay
|
||||
@@ -125,7 +125,7 @@ Feature: TUI first-run experience with actor selection overlay
|
||||
Given a new ActorSelectionOverlay
|
||||
When I call show on the overlay
|
||||
And I call confirm on the overlay
|
||||
Then the confirmed actor should be "anthropic/claude-4-sonnet"
|
||||
Then the confirmed actor should be "anthropic/claude-sonnet-4-20250514"
|
||||
|
||||
Scenario: ActorSelectionOverlay confirm hides the overlay
|
||||
Given a new ActorSelectionOverlay
|
||||
@@ -191,6 +191,6 @@ Feature: TUI first-run experience with actor selection overlay
|
||||
Scenario: _complete_first_run creates default persona and refreshes bar
|
||||
Given the TUI app is initialised with an empty persona registry
|
||||
When I call on_mount on the first-run app
|
||||
And I call _complete_first_run with actor "anthropic/claude-4-sonnet"
|
||||
And I call _complete_first_run with actor "anthropic/claude-sonnet-4-20250514"
|
||||
Then the registry should contain a persona named "default"
|
||||
And the persona bar should reflect the new actor
|
||||
|
||||
@@ -185,7 +185,7 @@ def run(
|
||||
except UnsafeConfigurationError as exc:
|
||||
typer.echo(f"Error: {exc}", err=True)
|
||||
raise typer.Exit(code=1) from exc
|
||||
except click.exceptions.Exit:
|
||||
except (click.exceptions.Exit, typer.Exit):
|
||||
raise
|
||||
except CleverAgentsError as exc:
|
||||
typer.echo(f"Error: {exc}", err=True)
|
||||
|
||||
@@ -159,7 +159,7 @@ def run(
|
||||
except UnsafeConfigurationError as exc:
|
||||
typer.echo(f"Error: {exc}", err=True)
|
||||
raise typer.Exit(code=1) from exc
|
||||
except click.exceptions.Exit:
|
||||
except (click.exceptions.Exit, typer.Exit):
|
||||
raise
|
||||
except CleverAgentsError as exc:
|
||||
typer.echo(f"Error: {exc}", err=True)
|
||||
|
||||
Reference in New Issue
Block a user