test_a_stated_data_model_records_its_tier¶
Tests › tests/test_tiers.py
What this test is for
Why it exists
gh#42. `status.options` CARRIED TIER ROWS FOR NINE SECTIONS AND NONE FOR `data_model`. The reporter stated it through `options`, watched the build log it as tier 1, and then found no record of it anywhere in the index — so a consumer reading an unexpected data-model catalog could not tell "this operator stated a manifest" from "this repository declares one" from "nobody said anything".
Given
class _Args: """@brief A namespace carrying only the stated option.""" data_model = "app/data/model.toml"
When
stated = _manifest_option_tiers(_Args(), {})options_meta(**stated)class _Bare: """@brief A namespace stating nothing."""
2 more
declared = _manifest_option_tiers(_Bare(), {"data_model": "app/data/model.toml"})options_meta(**declared)
Then
- ✓ stated contains "data_model"
- ✓ options_meta(**stated)[f"data_model.{TIER_KEY}"] equals TIER_EXPLICIT
- ✓ options_meta(**declared)[f"data_model.{TIER_KEY}"] equals TIER_DECLARED
tests/test_tiers.py:815 · its file's page
What it checks (3)
assert "data_model" in stated, ( "a stated data_model must reach the options meta like every other stated option" )observes_manifest_option_tiersviastatedassert options_meta(**stated)[f"data_model.{TIER_KEY}"] == TIER_EXPLICITobservesoptions_metaassert options_meta(**declared)[f"data_model.{TIER_KEY}"] == TIER_DECLAREDobservesoptions_meta
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.
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-CONFIG-006 measured