test_the_flag_outranks_the_environment¶
Tests › tests/test_mcp_server.py
What this test is for
Why it exists
An operator who typed `--repo` outranks the client's session directory. Without this the override would be unusable in exactly the case it exists for: a Claude Code session that also exports `CLAUDE_PROJECT_DIR`.
Verifies REQ-DDB-MCP-003 REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
Given
flagged, envd = tmp_path / "flagged", tmp_path / "envd"flagged.mkdir()
2 more
envd.mkdir()monkeypatch.setenv(st.PROJECT_DIR_ENV, str(envd))
When
st.startup_target(str(flagged))
Then
- ✓ st.startup_target(str(flagged)) equals (str(flagged), st.TARGET_SOURCE_FLAG)
tests/test_mcp_server.py:2552 · its file's page
What it checks (1)
assert st.startup_target(str(flagged)) == (str(flagged), st.TARGET_SOURCE_FLAG)observesstartup_target
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
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 (4)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-MCP-003 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
| REQ-DDB-QUERY-008 | catalog | unknown |
| REQ-DDB-QUERY-009 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-001 measured