test_the_refresh_loop_tells_the_hub_what_it_refreshed¶
Tests › tests/test_wiki_hub.py
What this test is for
Why it exists
P4c-2a: keep_current hands the refreshed slugs to the hub.
Given
told: list[list[str]] = []class _Hub: def refreshed(self, slugs: list[str]) -> None: told.append(slugs)
8 more
server = DocsDbServer.__new__(DocsDbServer)server.wiki_hub = _Hub()async def refresh() -> list[str]: return ["a-123456"]monkeypatch.setattr(server, "refresh_touched", refresh, raising=False)server._watcher = type("W", (), {"sync": lambda self, paths: None, "stop": lambda self: None})()server._touched = {}async def run() -> None: with anyio.move_on_after(0.5): await server.keep_current(0.05)anyio.run(run)
When
- —
Then
- ✓ told holds
- ✓ told[0] equals ["a-123456"]
tests/test_wiki_hub.py:341 · its file's page
What it checks (1)
assert told and told[0] == ["a-123456"]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 (3)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-032 | catalog | unknown |
| REQ-DDB-WIKI-033 | catalog | unknown |
| REQ-DDB-WIKI-054 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-004 measured