test_guard_utility_fold.py¶
tests/guard/test_guard_utility_fold.py
`@dg_internal` is gone: it folds into `@utility`, and the old tag is refused by name (PG1; 2.0.0).
test_dg_internal_is_refused_naming_its_replacement
None test_guard_utility_fold.test_dg_internal_is_refused_naming_its_replacement()
One violation, pointing at @utility.
tests/guard/test_guard_utility_fold.py:43
Checks
assert v.check == "tag" and "@dg_internal" in v.message and "@utility" in v.message
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-GUARD-001 | measured | test_dg_internal_is_refused_naming_its_replacement → check_removed_tags |
| REQ-DDB-GUARD-018 | measured | test_dg_internal_is_refused_naming_its_replacement → _func → parse_c → parse_lang → parse_functions |
| REQ-DDB-GUARD-019 | measured | test_dg_internal_is_refused_naming_its_replacement → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags |
| REQ-DDB-GUARD-020 | measured | test_dg_internal_is_refused_naming_its_replacement → _func → parse_c → parse_lang → parse_functions → parse_functions_ts |
| REQ-DDB-GUARD-021 | inferred | test_dg_internal_is_refused_naming_its_replacement → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block |
| REQ-DDB-GUARD-024 | inferred | test_dg_internal_is_refused_naming_its_replacement → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item |
| REQ-DDB-GUARD-025 | measured | test_dg_internal_is_refused_naming_its_replacement → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void |
Source · 6 lines
def test_dg_internal_is_refused_naming_its_replacement() -> None:
"""@brief One violation, pointing at @utility."""
(v,) = check_removed_tags(_func(_OLD), "a.c", CONFIG_DEFAULTS)
assert v.check == "tag" and "@dg_internal" in v.message and "@utility" in v.message
Activity · 2 steps
test_the_refusal_survives_known_tags_warn_off
None test_guard_utility_fold.test_the_refusal_survives_known_tags_warn_off()
Not an unknown-tag warning: `known_tags_warn: false` does not silence it.
tests/guard/test_guard_utility_fold.py:49
Checks
assert len(check_removed_tags(_func(_OLD), "a.c", config)) == 1
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-GUARD-001 | measured | test_the_refusal_survives_known_tags_warn_off → check_removed_tags |
| REQ-DDB-GUARD-018 | measured | test_the_refusal_survives_known_tags_warn_off → _func → parse_c → parse_lang → parse_functions |
| REQ-DDB-GUARD-019 | measured | test_the_refusal_survives_known_tags_warn_off → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags |
| REQ-DDB-GUARD-020 | measured | test_the_refusal_survives_known_tags_warn_off → _func → parse_c → parse_lang → parse_functions → parse_functions_ts |
| REQ-DDB-GUARD-021 | inferred | test_the_refusal_survives_known_tags_warn_off → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block |
| REQ-DDB-GUARD-024 | inferred | test_the_refusal_survives_known_tags_warn_off → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item |
| REQ-DDB-GUARD-025 | measured | test_the_refusal_survives_known_tags_warn_off → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void |
Source · 6 lines
def test_the_refusal_survives_known_tags_warn_off() -> None:
"""@brief Not an unknown-tag warning: `known_tags_warn: false` does not silence it."""
config = deep_merge(CONFIG_DEFAULTS, {"validate": {"known_tags_warn": False}})
assert len(check_removed_tags(_func(_OLD), "a.c", config)) == 1
Activity · 2 steps
test_utility_is_accepted
None test_guard_utility_fold.test_utility_is_accepted()
The replacement passes.
tests/guard/test_guard_utility_fold.py:55
Checks
assert check_removed_tags(_func(_NEW), "a.c", CONFIG_DEFAULTS) == []
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-GUARD-001 | measured | test_utility_is_accepted → check_removed_tags |
| REQ-DDB-GUARD-018 | measured | test_utility_is_accepted → _func → parse_c → parse_lang → parse_functions |
| REQ-DDB-GUARD-019 | measured | test_utility_is_accepted → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags |
| REQ-DDB-GUARD-020 | measured | test_utility_is_accepted → _func → parse_c → parse_lang → parse_functions → parse_functions_ts |
| REQ-DDB-GUARD-021 | inferred | test_utility_is_accepted → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block |
| REQ-DDB-GUARD-024 | inferred | test_utility_is_accepted → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item |
| REQ-DDB-GUARD-025 | measured | test_utility_is_accepted → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void |
Source · 3 lines
def test_utility_is_accepted() -> None:
"""@brief The replacement passes."""
assert check_removed_tags(_func(_NEW), "a.c", CONFIG_DEFAULTS) == []1 more lines, not shown