Commit 1af3889
test(resilience): use AsyncMock instead of pragma'd stub for never-called sleep
User feedback: # pragma: no cover on a user-defined function body that
intentionally never runs is the wrong shape — refactor to use a mock
whose body is structural (unittest.mock internals are excluded from
coverage measurement). AsyncMock().assert_not_called() expresses the
"must never run" assertion cleanly with no coverage gymnastics.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 25db15b commit 1af3889
1 file changed
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
378 | 376 | | |
379 | 377 | | |
380 | 378 | | |
381 | 379 | | |
382 | 380 | | |
383 | | - | |
| 381 | + | |
384 | 382 | | |
385 | 383 | | |
386 | 384 | | |
| |||
391 | 389 | | |
392 | 390 | | |
393 | 391 | | |
394 | | - | |
| 392 | + | |
395 | 393 | | |
396 | 394 | | |
397 | 395 | | |
| |||
0 commit comments