Commit dfca0a0
docs(tests): scope the failure-helper claim and fix safe_call_tool's docstring
Two corrections from Codex review:
call_tool_failure() only proves the call failed when expected_error is
given. assert_mcp_failure()'s check is `if data.get("success")`, so a
result dict that omits the key entirely is accepted as a failure. The
guidance now says to pass expected_error and states the limitation
rather than claiming the helper always proves failure.
safe_call_tool()'s own docstring still advertised it as the helper for
tests that expect a failure, contradicting the new rule in a second
place and recreating the ambiguity this branch removes. It now names its
real roles -- finally-block cleanup and availability probing -- and
points at call_tool_failure() for asserted failures.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015c4gkE9mcKu4RiuQzR5eff1 parent 3f229a2 commit dfca0a0
2 files changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
0 commit comments