test_only_the_emoji_table_is_self_declared_generated

Tests › tests/integration/test_mattermost_tree.py

passed Passed in the packaged run.

What this test is for

Why it exists

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.

Given

  1. conn = sqlite3.connect(mattermost_db)
  2. paths = { r[0] for r in conn.execute( "SELECT output_literal FROM generated_files WHERE kind LIKE 'self-declared:%'" ) }
→

When

  1. generation_rule(conn, "app/components/navigation_header/index.tsx")
→

Then

  1. ✓ paths equals {"app/utils/emoji/index.ts"}
  2. ✓ generation_rule(conn, "app/components/navigation_header/index.tsx") is None

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

Look up one name: everything the index holds about it · 1 of 226 steps

… 17 earlier steps

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pydossier18. _documentation_mentions → table_exists18table_exists19. _documentation_mentions → has_columns19has_columns20. has_columns → table_exists20table_exists▶ test enters21–22. _hint_from → _name_exists21_name_exists +1 more

… 204 later steps

2 more

tests/integration/test_mattermost_tree.py:104 · its file's page

What it checks (2)

  1. assert paths == {"app/utils/emoji/index.ts"}, paths not attributed
  2. assert generation_rule(conn, "app/components/navigation_header/index.tsx") is None observes generation_rule

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

test_only_the_emoji_table_is_self_declared_generated→generation_rule

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_only_the_emoji_table_is_self_declared_generated · 2 checksgeneration_ruletable_existsREQ-DDB-QUERY-003 · measuredgeneration_ruleREQ-DDB-QUERY-004 · measured
Also reaches 2 requirements

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