test_store_kconfig_refuses_an_unfound_model_on_its_own¶
Tests › tests/test_kconfig.py
What this test is for
Why it exists
FOUND BY A CONTROL, and the control is the only reason this exists.
Verifies REQ-DDB-PIPE-007 REQ-DDB-PIPE-014 REQ-DDB-QUERY-006
Given
db = tmp_path / "clew.db"_db_with_paths(db, ())
When
store_kconfig(db, KconfigModel(location=KconfigLocation(path=None)))conn = sqlite3.connect(str(db))tables = {row[0] for row in conn.execute("SELECT name FROM sqlite_master WHERE type='table'")}conn.close()
Then
- ✓ store_kconfig(db, KconfigModel(location=KconfigLocation(path=None))) equals 0
- ✓ tables does not contain "kconfig_symbols"
- ✓ tables does not contain "kconfig_choices"
tests/test_kconfig.py:750 · its file's page
What it checks (3)
assert store_kconfig(db, KconfigModel(location=KconfigLocation(path=None))) == 0observesstore_kconfigassert "kconfig_symbols" not in tablesnot attributedassert "kconfig_choices" not in tablesnot attributed
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
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-PIPE-007 | catalog | unknown |
| REQ-DDB-PIPE-014 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-005 measured
- REQ-DDB-SCHEMA-013 inferred