test_state_home_env_override

Tests › tests/test_mcp_server.py

passed Passed in the packaged run.

What this test is for

Why it exists

The state root is env-overridable and XDG-aware — never a hardcoded machine path.

Verifies REQ-DDB-MCP-003 REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009

Given

  1. monkeypatch.setenv(st.STATE_HOME_ENV, str(tmp_path / "explicit"))
→

When

  1. st.state_home()
  2. monkeypatch.delenv(st.STATE_HOME_ENV)
  3. monkeypatch.setenv("XDG_STATE_HOME", str(tmp_path / "xdg"))
→

Then

  1. ✓ st.state_home() equals tmp_path / "explicit"
  2. ✓ st.state_home() equals tmp_path / "xdg" / "clew"

tests/test_mcp_server.py:2069 · its file's page

What it checks (2)

  1. assert st.state_home() == tmp_path / "explicit" observes state_home
  2. assert st.state_home() == tmp_path / "xdg" / "clew" observes state_home

Where the product reaches it

  • main → query_main → _locate → target_for → state_home (flow)

Call flow

test_state_home_env_override→state_home

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.

test_state_home_env_override · 2 checksstate_homeREQ-DDB-MCP-001 · measured

Requirements it verifies (4)

requirementlinked byimplementers exercised
REQ-DDB-MCP-003catalogunknown
REQ-DDB-QUERY-006catalogunknown
REQ-DDB-QUERY-008catalogunknown
REQ-DDB-QUERY-009catalogunknown
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.