test_probed_module_name_is_derived_from_the_real_import¶
Tests › tests/test_mcp_server.py
What this test is for
Why it exists
The doctor's probe target must come FROM the import, not from a literal beside it.
Verifies REQ-DDB-MCP-001 REQ-DDB-MCP-003 REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
Given
- —
When
- —
Then
- ✓ _sdk.Context.__module__.startswith(_sdk.MCP_SERVER_MODULE + ".") holds
- ✓ importlib.util.find_spec(_sdk.MCP_SERVER_MODULE) is not None
tests/test_mcp_server.py:478 · its file's page
What it checks (2)
assert _sdk.Context.__module__.startswith(_sdk.MCP_SERVER_MODULE + "."), ( "the probed module must be a package prefix of the module Context really came from" )not attributedassert importlib.util.find_spec(_sdk.MCP_SERVER_MODULE) is not None, ( "the derived name must be importable — the doctor reports on this exact string" )not attributed
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 (5)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-MCP-001 | catalog | unknown |
| REQ-DDB-MCP-003 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
| REQ-DDB-QUERY-008 | catalog | unknown |
| REQ-DDB-QUERY-009 | catalog | unknown |