fix(tests): correct assert in test_sanitize_agent_error_stderr_and_exc
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 14s
E2E API Smoke Test / detect-changes (pull_request) Successful in 37s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 37s
CI / Detect changes (pull_request) Successful in 38s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 35s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 8s
CI / Platform (Go) (pull_request) Successful in 7s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 7s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 6s
audit-force-merge / audit (pull_request) Has been skipped
CI / Canvas (Next.js) (pull_request) Failing after 3m53s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Failing after 6m40s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 7m36s
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 14s
E2E API Smoke Test / detect-changes (pull_request) Successful in 37s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 37s
CI / Detect changes (pull_request) Successful in 38s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 35s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 8s
CI / Platform (Go) (pull_request) Successful in 7s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 7s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 6s
audit-force-merge / audit (pull_request) Has been skipped
CI / Canvas (Next.js) (pull_request) Failing after 3m53s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Failing after 6m40s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 7m36s
The exc class IS the tag when stderr is provided: "Agent error (ValueError): rate limit exceeded" Fixes the incorrect assertion added in PR #517. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
6b68f2dd25
commit
a35f6da339
@ -761,7 +761,7 @@ def test_sanitize_agent_error_stderr_and_exc():
|
||||
"""exception + stderr: exc type is the tag, stderr is the body."""
|
||||
err = ValueError("this should not appear")
|
||||
out = sanitize_agent_error(exc=err, stderr="rate limit exceeded")
|
||||
assert "ValueError" not in out # exc class is overridden by stderr
|
||||
assert "ValueError" in out # exc class IS the tag when stderr is provided
|
||||
assert "rate limit exceeded" in out
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user