Commit be0e93f
test(agent): revive the eight tests that have errored since 2025-10-21
`6f4803ef` (2025-10-21) deleted the `mocked_llm` fixture but left the two
fixtures that request it, and the eight tests that request those. They
have errored at setup ever since:
fixture 'mocked_llm' not found
Errors, not failures, so they read as infrastructure noise rather than
missing coverage — and one of them is the only save/load round-trip test
the repo has. The parent commit fixes an Agent.load() crash that this
test reproduces on its first run.
master 19 failed, 78 passed, 8 errors
here 19 failed, 84 passed, 0 errors
The 19 failures are unchanged and pre-existing (diffed, identical set).
mocked_llm is restored as a stub with `run`/`arun`. The fixtures now also
pin a tmp_path workspace and turn off autosave and persistent memory, so
the revived tests touch no shared state.
Three of the eight asserted an API the Agent has not had for years, which
is why simply restoring the fixture turns them into failures rather than
passes:
- test_flow_initialization asserted `max_loops == 5` against a fixture
that passes 1, plus `.feedback` and `.memory`. Rewritten to the
attributes that exist.
- test_provide_feedback called `.provide_feedback()` — deleted, the
method is gone.
- test_format_prompt called `.format_prompt()` — deleted, likewise.
- test_save_and_load appended to a `.memory` list. Rewritten as a real
scalar round trip (max_loops 9 -> 3, agent_name restored) through the
Agent API.
- test_flow_call asserted the call returned its own input, true only of
the deleted mock. Comparing two live calls does not work either — the
conversation grows between them — so it now pins the delegation:
__call__ forwards to run().
The remaining three (bulk_run, and both run_* tests) needed nothing but
the fixture back.
Closes kyegomez#2010
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 27c47f1 commit be0e93f
1 file changed
Lines changed: 94 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
44 | 67 | | |
45 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
46 | 78 | | |
47 | 79 | | |
48 | 80 | | |
49 | | - | |
| 81 | + | |
50 | 82 | | |
51 | 83 | | |
52 | 84 | | |
53 | 85 | | |
| 86 | + | |
54 | 87 | | |
55 | 88 | | |
56 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
57 | 95 | | |
58 | 96 | | |
59 | 97 | | |
| |||
108 | 146 | | |
109 | 147 | | |
110 | 148 | | |
111 | | - | |
112 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
113 | 157 | | |
114 | | - | |
115 | 158 | | |
116 | | - | |
117 | | - | |
118 | 159 | | |
119 | 160 | | |
120 | 161 | | |
121 | 162 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 163 | | |
129 | 164 | | |
130 | 165 | | |
| |||
147 | 182 | | |
148 | 183 | | |
149 | 184 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
154 | 200 | | |
155 | 201 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
159 | 218 | | |
160 | 219 | | |
161 | | - | |
162 | | - | |
163 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
164 | 231 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
169 | 235 | | |
170 | | - | |
171 | 236 | | |
172 | 237 | | |
173 | 238 | | |
| |||
0 commit comments