test_mattermost_tree.py¶
tests/integration/test_mattermost_tree.py
The TypeScript/JSX acceptance target, asserted on its REAL tree.
test_only_the_emoji_table_is_self_declared_generated
None test_mattermost_tree.test_only_the_emoji_table_is_self_declared_generated(Path mattermost_db)
The one generated file is recorded, by its exact path, and no namesake is.
tests/integration/test_mattermost_tree.py:104
Checks
assert paths == {"app/utils/emoji/index.ts"}, pathsassert generation_rule(conn, "app/components/navigation_header/index.tsx") is None
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-QUERY-003 | measured | test_only_the_emoji_table_is_self_declared_generated → generation_rule → table_exists |
| REQ-DDB-QUERY-004 | measured | test_only_the_emoji_table_is_self_declared_generated → generation_rule |
Source · 19 lines
def test_only_the_emoji_table_is_self_declared_generated(mattermost_db: Path) -> None:
"""MEASURED: one file in this tree declares itself generated, `app/utils/emoji/index.ts`. Its
basename is the most common in the repository, so a basename join would mark hundreds of
hand-written files generated; this asserts the exact-path rule holds at that scale.
@brief The exact-path rule holds on the real tree.
@version 1
"""
conn = sqlite3.connect(mattermost_db)
paths = {
r[0]
for r in conn.execute(
"SELECT output_literal FROM generated_files WHERE kind LIKE 'self-declared:%'"
)
}
assert paths == {"app/utils/emoji/index.ts"}, paths
assert generation_rule(conn, "app/components/navigation_header/index.tsx") is None
Activity · 4 steps
test_the_websocket_dispatcher_calls_the_reaction_handler
None test_mattermost_tree.test_the_websocket_dispatcher_calls_the_reaction_handler(Path mattermost_db)
The websocket dispatcher is recorded as the caller of Q2's handler.
tests/integration/test_mattermost_tree.py:127
Checks
assert "handleWebSocketEvent" in names, names
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-QUERY-001 | measured | test_the_websocket_dispatcher_calls_the_reaction_handler → callers |
| REQ-DDB-QUERY-003 | measured | test_the_websocket_dispatcher_calls_the_reaction_handler → callers → _call_edges → _dataflow_edges → resolve_rowid |
| REQ-DDB-QUERY-009 | measured | test_the_websocket_dispatcher_calls_the_reaction_handler → callers → _call_edges → _direct_call_edges → _implementors_by_identity |
| REQ-DDB-QUERY-010 | measured | test_the_websocket_dispatcher_calls_the_reaction_handler → callers |
Source · 9 lines
def test_the_websocket_dispatcher_calls_the_reaction_handler(mattermost_db: Path) -> None:
"""The first hop of Q2's flow, across files: `handleWebSocketEvent` (actions/websocket/event.ts)
calls `handleReactionAddedToPostEvent` (actions/websocket/reactions.ts).
@brief Q2's first hop is an edge.
@version 1
"""
names = {edge.name for edge in callers(mattermost_db, "handleReactionAddedToPostEvent")}
assert "handleWebSocketEvent" in names, names1 more lines, not shown