Commit 9b90eaa
Issue #147: make the real-world runner able to fail
main() dropped every runner.run_*_tests() return value and never called
sys.exit, so the script exited 0 no matter what. The pre-push hook guards
each category with `if ! python scripts/run_real_world_tests.py --<cat>`,
which therefore could never fire: four categories printed "failed" and the
hook still announced "All real-world tests passed!" and allowed the push.
Same class as the flake8 --exit-zero and mypy continue-on-error steps
fixed in #138 -- a check that reports problems but cannot fail.
Also fixes the second half of #147: the failure message printed only
result.stdout, which was empty in all four observed failures because a
pytest collection error goes to stderr. _report_failure now prints the
exit code, stdout, stderr, and says so explicitly when there was no
output at all.
Verified by appending a deliberately failing test to
tests/real_world/test_filesystem_real.py and running the script:
EXIT CODE: 1
❌ Filesystem tests failed (exit 1)
assert False, "deliberate failure to verify exit-code propagation"
E AssertionError: deliberate failure to verify exit-code propagation
and, with that test removed, the same command exits 0. Before this change
the failing case also exited 0 with an empty message body.
Also drops the removed backends from two scripts: the kubernetes tutorial
entry in check_docs_examples' _SECTION_BOUNDS (that page is deleted) and
the aws/azure/gcp/lambda_cloud entries in the credential display names.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012gTBDPK16HUZ3kHQ2QyjuU1 parent 62e7a29 commit 9b90eaa
2 files changed
Lines changed: 44 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
| 487 | + | |
493 | 488 | | |
494 | 489 | | |
495 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
16 | 34 | | |
17 | 35 | | |
18 | 36 | | |
| |||
51 | 69 | | |
52 | 70 | | |
53 | 71 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 72 | | |
58 | 73 | | |
59 | 74 | | |
60 | | - | |
61 | 75 | | |
62 | 76 | | |
63 | 77 | | |
| |||
110 | 124 | | |
111 | 125 | | |
112 | 126 | | |
113 | | - | |
114 | | - | |
| 127 | + | |
115 | 128 | | |
116 | 129 | | |
117 | 130 | | |
| |||
137 | 150 | | |
138 | 151 | | |
139 | 152 | | |
140 | | - | |
| 153 | + | |
141 | 154 | | |
142 | 155 | | |
143 | 156 | | |
| |||
163 | 176 | | |
164 | 177 | | |
165 | 178 | | |
166 | | - | |
| 179 | + | |
167 | 180 | | |
168 | 181 | | |
169 | 182 | | |
| |||
192 | 205 | | |
193 | 206 | | |
194 | 207 | | |
195 | | - | |
| 208 | + | |
196 | 209 | | |
197 | 210 | | |
198 | 211 | | |
| |||
220 | 233 | | |
221 | 234 | | |
222 | 235 | | |
223 | | - | |
| 236 | + | |
224 | 237 | | |
225 | 238 | | |
226 | 239 | | |
| |||
247 | 260 | | |
248 | 261 | | |
249 | 262 | | |
250 | | - | |
| 263 | + | |
251 | 264 | | |
252 | 265 | | |
253 | 266 | | |
| |||
282 | 295 | | |
283 | 296 | | |
284 | 297 | | |
285 | | - | |
| 298 | + | |
286 | 299 | | |
287 | 300 | | |
288 | 301 | | |
| |||
375 | 388 | | |
376 | 389 | | |
377 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
378 | 397 | | |
379 | | - | |
| 398 | + | |
380 | 399 | | |
381 | 400 | | |
382 | | - | |
| 401 | + | |
383 | 402 | | |
384 | 403 | | |
385 | | - | |
| 404 | + | |
386 | 405 | | |
387 | 406 | | |
388 | | - | |
| 407 | + | |
389 | 408 | | |
390 | 409 | | |
391 | | - | |
| 410 | + | |
392 | 411 | | |
393 | 412 | | |
394 | | - | |
| 413 | + | |
395 | 414 | | |
396 | 415 | | |
397 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
398 | 422 | | |
399 | 423 | | |
400 | 424 | | |
| |||
0 commit comments