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

Show on the map →

Called by none

Calls _func, check_removed_tags

Checks

  • assert v.check == "tag" and "@dg_internal" in v.message and "@utility" in v.message

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-001measuredtest_dg_internal_is_refused_naming_its_replacement → check_removed_tags
REQ-DDB-GUARD-018measuredtest_dg_internal_is_refused_naming_its_replacement → _func → parse_c → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_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-020measuredtest_dg_internal_is_refused_naming_its_replacement → _func → parse_c → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_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-024inferredtest_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-025measuredtest_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
lines 45–45(v,) = check_removed_tags(_func(_OLD), "a.c", CONFIG_DEFAULTS)lines 46–46assert v.check == "tag" and "@dg_internal" in v.message and "@utility" in v.message

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

requirementlinkedpath to the implementer
REQ-DDB-GUARD-001measuredtest_the_refusal_survives_known_tags_warn_off → check_removed_tags
REQ-DDB-GUARD-018measuredtest_the_refusal_survives_known_tags_warn_off → _func → parse_c → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_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-020measuredtest_the_refusal_survives_known_tags_warn_off → _func → parse_c → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_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-024inferredtest_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-025measuredtest_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
lines 51–51config = deep_merge(CONFIG_DEFAULTS, {"validate": {"known_tags_warn": False}})lines 52–52assert len(check_removed_tags(_func(_OLD), "a.c", config)) == 1

test_utility_is_accepted

None test_guard_utility_fold.test_utility_is_accepted()

The replacement passes.

tests/guard/test_guard_utility_fold.py:55

Show on the map →

Called by none

Calls _func, check_removed_tags

Checks

  • assert check_removed_tags(_func(_NEW), "a.c", CONFIG_DEFAULTS) == []

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-001measuredtest_utility_is_accepted → check_removed_tags
REQ-DDB-GUARD-018measuredtest_utility_is_accepted → _func → parse_c → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_utility_is_accepted → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_utility_is_accepted → _func → parse_c → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_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-024inferredtest_utility_is_accepted → _func → parse_c → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_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

Activity · 1 steps
lines 57–57assert check_removed_tags(_func(_NEW), "a.c", CONFIG_DEFAULTS) == []