test_build_tooling_record.py¶
tests/test_build_tooling_record.py
WHICH PARSER BUILT THIS INDEX, recorded rather than inferred.
test_an_unrecorded_toolchain_leaves_no_row
None test_build_tooling_record.test_an_unrecorded_toolchain_leaves_no_row(Path tmp_path)
No `tool.*` row when nothing was measured.
tests/test_build_tooling_record.py:50
Checks
assert not [key for key in _meta(db) if key.startswith("tool.")]
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CONFIG-006 | measured | test_an_unrecorded_toolchain_leaves_no_row → write_build_signature |
| REQ-DDB-CONFIG-007 | measured | test_an_unrecorded_toolchain_leaves_no_row → write_build_signature |
| REQ-DDB-PIPE-005 | measured | test_an_unrecorded_toolchain_leaves_no_row → write_build_signature |
Source · 14 lines
def test_an_unrecorded_toolchain_leaves_no_row(tmp_path: Path) -> None:
"""The falsy-drop rule, which every section here depends on: an absent key must read as
"not recorded" rather than as a version that was read and was blank.
@brief No `tool.*` row when nothing was measured. @version 1
"""
db = tmp_path / "clew.db"
sqlite3.connect(str(db)).close()
write_build_signature(db, tool={"substrate_version": ""})
assert not [key for key in _meta(db) if key.startswith("tool.")]
Activity · 4 steps
test_the_tool_section_is_stamped_under_its_own_prefix
None test_build_tooling_record.test_the_tool_section_is_stamped_under_its_own_prefix(Path tmp_path)
A `tool` dict lands as `tool.*` rows.
tests/test_build_tooling_record.py:40
Checks
assert _meta(db)["tool.substrate_version"] == "0.11.2"
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CONFIG-006 | measured | test_the_tool_section_is_stamped_under_its_own_prefix → write_build_signature |
| REQ-DDB-CONFIG-007 | measured | test_the_tool_section_is_stamped_under_its_own_prefix → write_build_signature |
| REQ-DDB-PIPE-005 | measured | test_the_tool_section_is_stamped_under_its_own_prefix → write_build_signature |
Source · 10 lines
def test_the_tool_section_is_stamped_under_its_own_prefix(tmp_path: Path) -> None:
"""@brief A `tool` dict lands as `tool.*` rows. @version 1"""
db = tmp_path / "clew.db"
sqlite3.connect(str(db)).close()
write_build_signature(db, tool={"substrate_version": "0.11.2"})
assert _meta(db)["tool.substrate_version"] == "0.11.2"