Commit 0ab50a9
test: fix the four failures in the unit suite
Both pairs were test bugs, not defects in the code under test.
tests/test_opencode_binary.py -- resolve_opencode_argv() returns str(Path), so
the expected value has to be spelled the same way: str(Path("/mgd/opencode"))
is "/mgd/opencode" on POSIX and "\mgd\opencode" on Windows. The POSIX form was
hard-coded, so `test_managed_present_wins` and `test_download_when_no_path`
failed on Windows only. Compare against str(Path(...)).
tests/general/test_four_way_standalone.py -- `set_hp` refuses to guess when the
process holds more than one hyperparam set ("Multiple hyperparam sets present;
provide hp_name explicitly"), and the ledger is global: the sets registered by
the other levels in this file, and by any module that ran earlier in the same
process, are still there. So the two set_hp tests passed or failed depending on
what had run before them. They now name their set via resolve_hp_name(),
exactly as test_hp_lists_and_shows in the same file already does for `hp` --
and which its own comment explains was added for this reason.
Full suite as CI runs it (pytest ./tests -m "not scale"): 1901 passed,
145 skipped, 17 deselected.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent b0347d3 commit 0ab50a9
2 files changed
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
507 | 514 | | |
508 | | - | |
| 515 | + | |
509 | 516 | | |
510 | 517 | | |
511 | 518 | | |
512 | 519 | | |
513 | 520 | | |
514 | 521 | | |
515 | | - | |
| 522 | + | |
516 | 523 | | |
517 | 524 | | |
518 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
224 | 230 | | |
225 | | - | |
| 231 | + | |
226 | 232 | | |
227 | 233 | | |
228 | 234 | | |
| |||
237 | 243 | | |
238 | 244 | | |
239 | 245 | | |
240 | | - | |
| 246 | + | |
241 | 247 | | |
242 | 248 | | |
243 | 249 | | |
| |||
0 commit comments