test_absolute_path_is_used_and_flagged_non_portable¶
Tests › tests/test_init.py
What this test is for
Why it exists
A bare name the launching shell cannot resolve produces a server that silently never starts, which is strictly worse than a machine-specific path. So the path is written — and reported as non-portable rather than chosen quietly on the user's behalf.
Verifies REQ-DDB-CLI-002
Given
script = tmp_path / "outside" / CONSOLE_SCRIPTscript.parent.mkdir()script.touch()
When
resolution = resolve_server_command( repo, INIT_SCOPE_REPO, which=lambda _cmd: None, bindir=script.parent )
Then
- ✓ resolution.command equals str(script)
- ✓ resolution.portable is false
- ✓ resolution.origin contains "not on PATH"
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
clew — `main` (clew/cli.py) · 3 of 400 steps
… 166 earlier steps
… 227 later steps
tests/test_init.py:1008 · its file's page
What it checks (3)
assert resolution.command == str(script)observesresolve_server_commandviaresolutionassert not resolution.portableobservesresolve_server_commandviaresolutionassert "not on PATH" in resolution.originobservesresolve_server_commandviaresolution
Where the product reaches it
main→init_main→_register→resolve_server_command(flow)
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-CLI-002 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-001 measured