test_declared_path_section_resolves_relative_to_the_repo

Tests › tests/test_declaration.py

passed Passed in the packaged run.

What this test is for

Why it exists

Formats that are not YAML (the ingot data-model TOML) are NAMED by the section rather than inlined; the path stays repo-relative so the declaration is portable.

Given

  1. (tmp_path / "model.toml").write_text("", encoding="utf-8")
  2. decl = {SECTION_DATA_MODEL: "model.toml"}
→

When

  1. declared_path(decl, SECTION_DATA_MODEL, tmp_path)
  2. declared_path({SECTION_DATA_MODEL: "gone.toml"}, SECTION_DATA_MODEL, tmp_path)
  3. declared_path({}, SECTION_DATA_MODEL, tmp_path)
→

Then

  1. ✓ declared_path(decl, SECTION_DATA_MODEL, tmp_path) equals (tmp_path / "model.toml").resolve()
  2. ✓ declared_path({SECTION_DATA_MODEL: "gone.toml"}, SECTION_DATA_MODEL, tmp_path) is None
  3. ✓ declared_path({}, SECTION_DATA_MODEL, tmp_path) is None

tests/test_declaration.py:81 · its file's page

What it checks (3)

  1. assert declared_path(decl, SECTION_DATA_MODEL, tmp_path) == (tmp_path / "model.toml").resolve() observes declared_path
  2. assert declared_path({SECTION_DATA_MODEL: "gone.toml"}, SECTION_DATA_MODEL, tmp_path) is None observes declared_path
  3. assert declared_path({}, SECTION_DATA_MODEL, tmp_path) is None observes declared_path

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_declared_path_section_resolves_relative_to_the_repo→declared_path

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_declared_path_section_resolves_relative_to_the_repo · 3 checksdeclared_pathREQ-DDB-CONFIG-001 · measured
Also reaches 1 requirement

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