test_guard_python.py

tests/guard/test_guard_python.py

Tests for Python ## doxygen comment support.

test_async_def_detected

test_guard_python.TestPythonFunctionDetection.test_async_def_detected(self)

tests/guard/test_guard_python.py:35

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert functions[0].name == "handler"
  • assert functions[0].doxygen is not None

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_async_def_detected → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_async_def_detected → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_async_def_detected → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_async_def_detected → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_async_def_detected → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_async_def_detected → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 13 lines
    def test_async_def_detected(self):
        content = dedent("""\
            ## @brief Async handler.
            #  @version 1.0
            async def handler(event):
                await process(event)
        """)
        functions = parse_python(content)
        assert len(functions) == 1
        assert functions[0].name == "handler"
        assert functions[0].doxygen is not None

Activity · 5 steps
lines 36–41content = dedent("""\ ## @brief Async handler. # @version 1.0 async def handler(event): await process(event) """)lines 42–42functions = parse_python(content)lines 43–43assert len(functions) == 1lines 44–44assert functions[0].name == "handler"lines 45–45assert functions[0].doxygen is not None

test_block_above_takes_precedence_over_docstring

test_guard_python.TestPythonDocstringTags.test_block_above_takes_precedence_over_docstring(self)

tests/guard/test_guard_python.py:289

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert dox is not None
  • assert dox.tags["brief"] == ["Block-above wins."]
  • assert dox.tags["version"] == ["2.0"]

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_block_above_takes_precedence_over_docstring → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_block_above_takes_precedence_over_docstring → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_block_above_takes_precedence_over_docstring → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_block_above_takes_precedence_over_docstring → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_block_above_takes_precedence_over_docstring → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_block_above_takes_precedence_over_docstring → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 19 lines
    def test_block_above_takes_precedence_over_docstring(self):
        content = dedent('''\
            ## @brief Block-above wins.
            #  @version 2.0
            def helper():
                """Body docstring.

                @brief Should be ignored when block above exists.
                @version 9.9
                """
                return 1
        ''')
        functions = parse_python(content)
        assert len(functions) == 1
        dox = functions[0].doxygen
        assert dox is not None
        assert dox.tags["brief"] == ["Block-above wins."]
        assert dox.tags["version"] == ["2.0"]
Activity · 7 steps
lines 290–300content = dedent('''\ ## @brief Block-above wins. # @version 2.0 def helper(): """Body docstring. @brief Should be ignored when block above exists. @version 9.9 """ return 1 ''')lines 301–301functions = parse_python(content)lines 302–302assert len(functions) == 1lines 303–303dox = functions[0].doxygenlines 304–304assert dox is not Nonelines 305–305assert dox.tags["brief"] == ["Block-above wins."]lines 306–306assert dox.tags["version"] == ["2.0"]

test_class_level_block_does_not_leak_to_first_method

test_guard_python.TestFirstMemberDoxygen.test_class_level_block_does_not_leak_to_first_method(self, tmp_path)

The guard on the fix: stepping out must not adopt the class's own block.

tests/guard/test_guard_python.py:400

Show on the map →

Called by none

Calls _undocumented

Checks

  • assert any("undocumented_first" in m for m in flagged)

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file
REQ-DDB-GUARD-002inferredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_class_level_block_does_not_leak_to_first_method → _undocumented → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 14 lines
    def test_class_level_block_does_not_leak_to_first_method(self, tmp_path):
        """The guard on the fix: stepping out must not adopt the class's own block."""
        flagged = self._undocumented(
            tmp_path,
            """\
                ## @brief Doc for the class itself.
                #  @version 9.9
                class Thing:
                    def undocumented_first(self):
                        pass
            """,
        )
        assert any("undocumented_first" in m for m in flagged)
Activity · 2 steps
lines 402–411flagged = self._undocumented( tmp_path, """\ ## @brief Doc for the class itself. # @version 9.9 class Thing: def undocumented_first(self): pass """, )lines 412–412assert any("undocumented_first" in m for m in flagged)

test_custom_tag_single_line

test_guard_python.TestPythonDoxygenBlocks.test_custom_tag_single_line(self)

tests/guard/test_guard_python.py:133

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert tags["brief"] == ["Func."]
  • assert tags["mycustomtag"] == ["some-value"]

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_custom_tag_single_line → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_custom_tag_single_line → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_custom_tag_single_line → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_custom_tag_single_line → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_custom_tag_single_line → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_custom_tag_single_line → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 13 lines
    def test_custom_tag_single_line(self):
        content = dedent("""\
            ## @brief Func. @mycustomtag some-value
            def func():
                pass
        """)
        functions = parse_python(content)
        assert len(functions) == 1
        tags = functions[0].doxygen.tags
        assert tags["brief"] == ["Func."]
        assert tags["mycustomtag"] == ["some-value"]

Activity · 6 steps
lines 134–138content = dedent("""\ ## @brief Func. @mycustomtag some-value def func(): pass """)lines 139–139functions = parse_python(content)lines 140–140assert len(functions) == 1lines 141–141tags = functions[0].doxygen.tagslines 142–142assert tags["brief"] == ["Func."]lines 143–143assert tags["mycustomtag"] == ["some-value"]

test_docstring_satisfies_req_tag

test_guard_python.TestPythonDocstringTags.test_docstring_satisfies_req_tag(self, tmp_path)

tests/guard/test_guard_python.py:321

Checks

  • assert violations == []

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_docstring_satisfies_req_tag → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_docstring_satisfies_req_tag → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_docstring_satisfies_req_tag → validate_file
REQ-DDB-GUARD-002inferredtest_docstring_satisfies_req_tag → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_docstring_satisfies_req_tag → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_docstring_satisfies_req_tag → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_docstring_satisfies_req_tag → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_docstring_satisfies_req_tag → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_docstring_satisfies_req_tag → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_docstring_satisfies_req_tag → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_docstring_satisfies_req_tag → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_docstring_satisfies_req_tag → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_docstring_satisfies_req_tag → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_docstring_satisfies_req_tag → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_docstring_satisfies_req_tag → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_docstring_satisfies_req_tag → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_docstring_satisfies_req_tag → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021measuredtest_docstring_satisfies_req_tag → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_docstring_satisfies_req_tag → validate_file → get_file_at_revision
REQ-DDB-GUARD-024measuredtest_docstring_satisfies_req_tag → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_docstring_satisfies_req_tag → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_docstring_satisfies_req_tag → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_docstring_satisfies_req_tag → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_docstring_satisfies_req_tag → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_docstring_satisfies_req_tag → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 18 lines
    def test_docstring_satisfies_req_tag(self, tmp_path):
        py_file = tmp_path / "doc.py"
        py_file.write_text(
            dedent('''\
                def handle() -> None:
                    """Handler.

                    @brief Event handler.
                    @version 1.0
                    @req REQ-PY-001
                    """
                    pass
            '''),
        )
        violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)
        assert violations == []

Activity · 4 steps
lines 322–322py_file = tmp_path / "doc.py"lines 323–334py_file.write_text( dedent('''\ def handle() -> None: """Handler. @brief Event handler. @version 1.0 @req REQ-PY-001 """ pass '''), )lines 335–335violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)lines 336–336assert violations == []

test_docstring_tags_satisfy_presence

test_guard_python.TestPythonDocstringTags.test_docstring_tags_satisfy_presence(self, tmp_path)

tests/guard/test_guard_python.py:228

Checks

  • assert violations == [], f"expected clean run, got: {[str(v) for v in violations]}"

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_docstring_tags_satisfy_presence → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_docstring_tags_satisfy_presence → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_docstring_tags_satisfy_presence → validate_file
REQ-DDB-GUARD-002inferredtest_docstring_tags_satisfy_presence → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_docstring_tags_satisfy_presence → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_docstring_tags_satisfy_presence → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_docstring_tags_satisfy_presence → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_docstring_tags_satisfy_presence → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_docstring_tags_satisfy_presence → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_docstring_tags_satisfy_presence → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_docstring_tags_satisfy_presence → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_docstring_tags_satisfy_presence → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_docstring_tags_satisfy_presence → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_docstring_tags_satisfy_presence → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_docstring_tags_satisfy_presence → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_docstring_tags_satisfy_presence → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_docstring_tags_satisfy_presence → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021measuredtest_docstring_tags_satisfy_presence → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_docstring_tags_satisfy_presence → validate_file → get_file_at_revision
REQ-DDB-GUARD-024measuredtest_docstring_tags_satisfy_presence → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_docstring_tags_satisfy_presence → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_docstring_tags_satisfy_presence → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_docstring_tags_satisfy_presence → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_docstring_tags_satisfy_presence → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_docstring_tags_satisfy_presence → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 17 lines
    def test_docstring_tags_satisfy_presence(self, tmp_path):
        py_file = tmp_path / "doc.py"
        py_file.write_text(
            dedent('''\
                def apply_patch(path: str) -> int:
                    """Apply a unified-diff patch.

                    @brief Apply a unified-diff patch to a project directory.
                    @version 1.0
                    @return 0 on success.
                    """
                    return 0
            '''),
        )
        violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)
        assert violations == [], f"expected clean run, got: {[str(v) for v in violations]}"
Activity · 4 steps
lines 229–229py_file = tmp_path / "doc.py"lines 230–241py_file.write_text( dedent('''\ def apply_patch(path: str) -> int: """Apply a unified-diff patch. @brief Apply a unified-diff patch to a project directory. @version 1.0 @return 0 on success. """ return 0 '''), )lines 242–242violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)lines 243–243assert violations == [], f"expected clean run, got: {[str(v) for v in violations]}"

test_docstring_tags_via_regex_parser

test_guard_python.TestPythonDocstringTags.test_docstring_tags_via_regex_parser(self)

tests/guard/test_guard_python.py:245

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert dox is not None
  • assert dox.tags["brief"] == ["Helper function."]
  • assert dox.tags["version"] == ["1.2"]
  • assert "return" in dox.tags

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_docstring_tags_via_regex_parser → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_docstring_tags_via_regex_parser → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_docstring_tags_via_regex_parser → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021measuredtest_docstring_tags_via_regex_parser → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024measuredtest_docstring_tags_via_regex_parser → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_docstring_tags_via_regex_parser → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 19 lines
    def test_docstring_tags_via_regex_parser(self):
        content = dedent('''\
            def helper(x: int) -> int:
                """Short summary.

                @brief Helper function.
                @version 1.2
                @return Doubled value.
                """
                return x * 2
        ''')
        functions = parse_python(content)
        assert len(functions) == 1
        dox = functions[0].doxygen
        assert dox is not None
        assert dox.tags["brief"] == ["Helper function."]
        assert dox.tags["version"] == ["1.2"]
        assert "return" in dox.tags
Activity · 8 steps
lines 246–255content = dedent('''\ def helper(x: int) -> int: """Short summary. @brief Helper function. @version 1.2 @return Doubled value. """ return x * 2 ''')lines 256–256functions = parse_python(content)lines 257–257assert len(functions) == 1lines 258–258dox = functions[0].doxygenlines 259–259assert dox is not Nonelines 260–260assert dox.tags["brief"] == ["Helper function."]lines 261–261assert dox.tags["version"] == ["1.2"]lines 262–262assert "return" in dox.tags

test_doxygen_associated_correctly

test_guard_python.TestPythonDoxygenBlocks.test_doxygen_associated_correctly(self)

tests/guard/test_guard_python.py:51

Show on the map →

Called by none

Calls parse_python

Checks

  • assert by_name["init_system"].doxygen is not None
  • assert "brief" in by_name["init_system"].doxygen.tags
  • assert "version" in by_name["init_system"].doxygen.tags
  • assert by_name["process_data"].doxygen is not None
  • assert by_name["handle_event"].doxygen is not None
  • assert "req" in by_name["handle_event"].doxygen.tags

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_doxygen_associated_correctly → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_doxygen_associated_correctly → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_doxygen_associated_correctly → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021measuredtest_doxygen_associated_correctly → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_doxygen_associated_correctly → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_doxygen_associated_correctly → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 13 lines
    def test_doxygen_associated_correctly(self):
        content = (FIXTURES_DIR / "python_simple.py").read_text()
        functions = parse_python(content)
        by_name = {f.name: f for f in functions}

        assert by_name["init_system"].doxygen is not None
        assert "brief" in by_name["init_system"].doxygen.tags
        assert "version" in by_name["init_system"].doxygen.tags

        assert by_name["process_data"].doxygen is not None
        assert by_name["handle_event"].doxygen is not None
        assert "req" in by_name["handle_event"].doxygen.tags
Activity · 9 steps
lines 52–52content = (FIXTURES_DIR / "python_simple.py").read_text()lines 53–53functions = parse_python(content)lines 54–54by_name = {f.name: f for f in functions}lines 56–56assert by_name["init_system"].doxygen is not Nonelines 57–57assert "brief" in by_name["init_system"].doxygen.tagslines 58–58assert "version" in by_name["init_system"].doxygen.tagslines 60–60assert by_name["process_data"].doxygen is not Nonelines 61–61assert by_name["handle_event"].doxygen is not Nonelines 62–62assert "req" in by_name["handle_event"].doxygen.tags

test_empty_docstring_is_not_a_block

test_guard_python.TestPythonDocstringTags.test_empty_docstring_is_not_a_block(self)

tests/guard/test_guard_python.py:281

Show on the map →

Called by none

Calls parse_python

Checks

  • assert parse_python(content)[0].doxygen is None

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_empty_docstring_is_not_a_block → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_empty_docstring_is_not_a_block → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_empty_docstring_is_not_a_block → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021measuredtest_empty_docstring_is_not_a_block → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_empty_docstring_is_not_a_block → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_empty_docstring_is_not_a_block → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 8 lines
    def test_empty_docstring_is_not_a_block(self):
        content = dedent('''\
            def helper():
                """"""
                return 1
        ''')
        assert parse_python(content)[0].doxygen is None
Activity · 2 steps
lines 282–286content = dedent('''\ def helper(): """""" return 1 ''')lines 287–287assert parse_python(content)[0].doxygen is None

test_file_tag_in_prose_does_not_suppress_the_block

test_guard_python.TestFirstMemberDoxygen.test_file_tag_in_prose_does_not_suppress_the_block(self, tmp_path)

Only a real

tests/guard/test_guard_python.py:448

Show on the map →

Called by none

Calls parse_python

Checks

  • assert work.doxygen is not None
  • assert work.doxygen.tags["version"] == ["1.0"]

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_file_tag_in_prose_does_not_suppress_the_block → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_file_tag_in_prose_does_not_suppress_the_block → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_file_tag_in_prose_does_not_suppress_the_block → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_file_tag_in_prose_does_not_suppress_the_block → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_file_tag_in_prose_does_not_suppress_the_block → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_file_tag_in_prose_does_not_suppress_the_block → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 20 lines
    def test_file_tag_in_prose_does_not_suppress_the_block(self, tmp_path):
        """Only a real @file tag marks a block file-level, not a prose mention.

        Caught by this repo's own gate while implementing the fix:
        _collect_python_comments describes the file-tag rule in its own @details prose,
        and an unanchored match discarded that function's doxygen block entirely.
        """
        py_file = tmp_path / "m.py"
        py_file.write_text(
            dedent("""\
                ## @brief Handle a header that declares @file itself.
                #  @version 1.0
                #  @return zero
                def work() -> int:
                    return 0
            """)
        )
        work = next(f for f in parse_python(py_file.read_text()) if f.name == "work")
        assert work.doxygen is not None
        assert work.doxygen.tags["version"] == ["1.0"]

1 more lines, not shown

Activity · 5 steps
lines 455–455py_file = tmp_path / "m.py"lines 456–464py_file.write_text( dedent("""\ ## @brief Handle a header that declares @file itself. # @version 1.0 # @return zero def work() -> int: return 0 """) )lines 465–465work = next(f for f in parse_python(py_file.read_text()) if f.name == "work")lines 466–466assert work.doxygen is not Nonelines 467–467assert work.doxygen.tags["version"] == ["1.0"]

test_finds_all_functions

test_guard_python.TestPythonFunctionDetection.test_finds_all_functions(self)

tests/guard/test_guard_python.py:23

Show on the map →

Called by none

Calls parse_python

Checks

  • assert "init_system" in names
  • assert "process_data" in names
  • assert "undocumented_function" in names
  • assert "handle_event" in names
  • assert "__init__" in names
  • assert "get_value" in names
  • assert "undocumented_method" in names

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_finds_all_functions → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_finds_all_functions → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_finds_all_functions → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021measuredtest_finds_all_functions → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_finds_all_functions → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_finds_all_functions → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 12 lines
    def test_finds_all_functions(self):
        content = (FIXTURES_DIR / "python_simple.py").read_text()
        functions = parse_python(content)
        names = [f.name for f in functions]
        assert "init_system" in names
        assert "process_data" in names
        assert "undocumented_function" in names
        assert "handle_event" in names
        assert "__init__" in names
        assert "get_value" in names
        assert "undocumented_method" in names
Activity · 10 steps
lines 24–24content = (FIXTURES_DIR / "python_simple.py").read_text()lines 25–25functions = parse_python(content)lines 26–26names = [f.name for f in functions]lines 27–27assert "init_system" in nameslines 28–28assert "process_data" in nameslines 29–29assert "undocumented_function" in nameslines 30–30assert "handle_event" in nameslines 31–31assert "__init__" in nameslines 32–32assert "get_value" in nameslines 33–33assert "undocumented_method" in names

test_first_method_after_class_docstring_still_found

test_guard_python.TestFirstMemberDoxygen.test_first_method_after_class_docstring_still_found(self, tmp_path)

tests/guard/test_guard_python.py:385

Show on the map →

Called by none

Calls _undocumented

Checks

  • assert flagged == []

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file
REQ-DDB-GUARD-002inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_first_method_after_class_docstring_still_found → _undocumented → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 15 lines
    def test_first_method_after_class_docstring_still_found(self, tmp_path):
        flagged = self._undocumented(
            tmp_path,
            '''\
                class Thing:
                    """Class docstring."""

                    ## @brief First method.
                    #  @version 1.0
                    def alpha(self):
                        pass
            ''',
        )
        assert flagged == []
Activity · 2 steps
lines 386–397flagged = self._undocumented( tmp_path, '''\ class Thing: """Class docstring.""" ## @brief First method. # @version 1.0 def alpha(self): pass ''', )lines 398–398assert flagged == []

test_first_method_directly_after_class_line

test_guard_python.TestFirstMemberDoxygen.test_first_method_directly_after_class_line(self, tmp_path)

tests/guard/test_guard_python.py:354

Show on the map →

Called by none

Calls _undocumented

Checks

  • assert flagged == []

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_first_method_directly_after_class_line → _undocumented → validate_file
REQ-DDB-GUARD-002inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_first_method_directly_after_class_line → _undocumented → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_first_method_directly_after_class_line → _undocumented → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 13 lines
    def test_first_method_directly_after_class_line(self, tmp_path):
        flagged = self._undocumented(
            tmp_path,
            """\
                class Thing:
                    ## @brief First method.
                    #  @version 1.0
                    def alpha(self):
                        pass
            """,
        )
        assert flagged == []
Activity · 2 steps
lines 355–364flagged = self._undocumented( tmp_path, """\ class Thing: ## @brief First method. # @version 1.0 def alpha(self): pass """, )lines 365–365assert flagged == []

test_first_method_version_is_its_own

test_guard_python.TestFirstMemberDoxygen.test_first_method_version_is_its_own(self, tmp_path)

Beyond presence: the tags must come from the method's block, not elsewhere.

tests/guard/test_guard_python.py:428

Show on the map →

Called by none

Calls parse_python

Checks

  • assert alpha.doxygen is not None
  • assert alpha.doxygen.tags["version"] == ["2.5"]
  • assert alpha.doxygen.tags["brief"] == ["Method block."]

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_first_method_version_is_its_own → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_first_method_version_is_its_own → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_first_method_version_is_its_own → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_first_method_version_is_its_own → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_first_method_version_is_its_own → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_first_method_version_is_its_own → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 20 lines
    def test_first_method_version_is_its_own(self, tmp_path):
        """Beyond presence: the tags must come from the method's block, not elsewhere."""
        py_file = tmp_path / "sample.py"
        py_file.write_text(
            dedent("""\
                ## @brief Class block.
                #  @version 9.9
                class Thing:
                    ## @brief Method block.
                    #  @version 2.5
                    def alpha(self):
                        pass
            """)
        )
        functions = parse_python(py_file.read_text())
        alpha = next(f for f in functions if f.name == "alpha")
        assert alpha.doxygen is not None
        assert alpha.doxygen.tags["version"] == ["2.5"]
        assert alpha.doxygen.tags["brief"] == ["Method block."]
Activity · 7 steps
lines 430–430py_file = tmp_path / "sample.py"lines 431–441py_file.write_text( dedent("""\ ## @brief Class block. # @version 9.9 class Thing: ## @brief Method block. # @version 2.5 def alpha(self): pass """) )lines 442–442functions = parse_python(py_file.read_text())lines 443–443alpha = next(f for f in functions if f.name == "alpha")lines 444–444assert alpha.doxygen is not Nonelines 445–445assert alpha.doxygen.tags["version"] == ["2.5"]lines 446–446assert alpha.doxygen.tags["brief"] == ["Method block."]

test_fully_documented_python

test_guard_python.TestPythonPresenceCheck.test_fully_documented_python(self, tmp_path)

tests/guard/test_guard_python.py:160

Checks

  • assert violations == []

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_fully_documented_python → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_fully_documented_python → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_fully_documented_python → validate_file
REQ-DDB-GUARD-002inferredtest_fully_documented_python → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_fully_documented_python → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_fully_documented_python → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_fully_documented_python → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_fully_documented_python → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_fully_documented_python → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_fully_documented_python → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_fully_documented_python → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_fully_documented_python → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_fully_documented_python → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_fully_documented_python → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_fully_documented_python → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_fully_documented_python → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_fully_documented_python → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021inferredtest_fully_documented_python → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_fully_documented_python → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_fully_documented_python → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_fully_documented_python → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_fully_documented_python → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_fully_documented_python → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_fully_documented_python → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_fully_documented_python → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 13 lines
    def test_fully_documented_python(self, tmp_path):
        py_file = tmp_path / "clean.py"
        py_file.write_text(
            dedent("""\
                ## @brief Do work.
                #  @version 1.0
                def do_work():
                    pass
            """)
        )
        violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)
        assert violations == []
Activity · 4 steps
lines 161–161py_file = tmp_path / "clean.py"lines 162–169py_file.write_text( dedent("""\ ## @brief Do work. # @version 1.0 def do_work(): pass """) )lines 170–170violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)lines 171–171assert violations == []

test_later_method_still_found

test_guard_python.TestFirstMemberDoxygen.test_later_method_still_found(self, tmp_path)

tests/guard/test_guard_python.py:367

Show on the map →

Called by none

Calls _undocumented

Checks

  • assert flagged == []

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_later_method_still_found → _undocumented → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_later_method_still_found → _undocumented → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_later_method_still_found → _undocumented → validate_file
REQ-DDB-GUARD-002inferredtest_later_method_still_found → _undocumented → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_later_method_still_found → _undocumented → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_later_method_still_found → _undocumented → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_later_method_still_found → _undocumented → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_later_method_still_found → _undocumented → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_later_method_still_found → _undocumented → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_later_method_still_found → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_later_method_still_found → _undocumented → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_later_method_still_found → _undocumented → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_later_method_still_found → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_later_method_still_found → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_later_method_still_found → _undocumented → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_later_method_still_found → _undocumented → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_later_method_still_found → _undocumented → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021inferredtest_later_method_still_found → _undocumented → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_later_method_still_found → _undocumented → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_later_method_still_found → _undocumented → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_later_method_still_found → _undocumented → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_later_method_still_found → _undocumented → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_later_method_still_found → _undocumented → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_later_method_still_found → _undocumented → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_later_method_still_found → _undocumented → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 18 lines
    def test_later_method_still_found(self, tmp_path):
        flagged = self._undocumented(
            tmp_path,
            """\
                class Thing:
                    ## @brief First.
                    #  @version 1.0
                    def alpha(self):
                        pass

                    ## @brief Second.
                    #  @version 1.0
                    def beta(self):
                        pass
            """,
        )
        assert flagged == []
Activity · 2 steps
lines 368–382flagged = self._undocumented( tmp_path, """\ class Thing: ## @brief First. # @version 1.0 def alpha(self): pass ## @brief Second. # @version 1.0 def beta(self): pass """, )lines 383–383assert flagged == []

test_multiline_tags

test_guard_python.TestPythonDoxygenBlocks.test_multiline_tags(self)

tests/guard/test_guard_python.py:91

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert tags["brief"] == ["Process data from the sensor."]
  • assert tags["version"] == ["2.0"]
  • assert "param" in tags
  • assert "return" in tags

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_multiline_tags → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_multiline_tags → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_multiline_tags → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_multiline_tags → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_multiline_tags → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_multiline_tags → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 17 lines
    def test_multiline_tags(self):
        content = dedent("""\
            ## @brief Process data from the sensor.
            #  @version 2.0
            #  @param data Raw sensor reading.
            #  @return Calibrated value.
            def process_sensor(data):
                return calibrate(data)
        """)
        functions = parse_python(content)
        assert len(functions) == 1
        tags = functions[0].doxygen.tags
        assert tags["brief"] == ["Process data from the sensor."]
        assert tags["version"] == ["2.0"]
        assert "param" in tags
        assert "return" in tags
Activity · 8 steps
lines 92–99content = dedent("""\ ## @brief Process data from the sensor. # @version 2.0 # @param data Raw sensor reading. # @return Calibrated value. def process_sensor(data): return calibrate(data) """)lines 100–100functions = parse_python(content)lines 101–101assert len(functions) == 1lines 102–102tags = functions[0].doxygen.tagslines 103–103assert tags["brief"] == ["Process data from the sensor."]lines 104–104assert tags["version"] == ["2.0"]lines 105–105assert "param" in tagslines 106–106assert "return" in tags

test_nested_class_first_method

test_guard_python.TestFirstMemberDoxygen.test_nested_class_first_method(self, tmp_path)

tests/guard/test_guard_python.py:414

Show on the map →

Called by none

Calls _undocumented

Checks

  • assert flagged == []

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_nested_class_first_method → _undocumented → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_nested_class_first_method → _undocumented → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_nested_class_first_method → _undocumented → validate_file
REQ-DDB-GUARD-002inferredtest_nested_class_first_method → _undocumented → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_nested_class_first_method → _undocumented → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_nested_class_first_method → _undocumented → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_nested_class_first_method → _undocumented → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_nested_class_first_method → _undocumented → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_nested_class_first_method → _undocumented → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_nested_class_first_method → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_nested_class_first_method → _undocumented → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_nested_class_first_method → _undocumented → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_nested_class_first_method → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_nested_class_first_method → _undocumented → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_nested_class_first_method → _undocumented → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_nested_class_first_method → _undocumented → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_nested_class_first_method → _undocumented → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021inferredtest_nested_class_first_method → _undocumented → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_nested_class_first_method → _undocumented → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_nested_class_first_method → _undocumented → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_nested_class_first_method → _undocumented → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_nested_class_first_method → _undocumented → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_nested_class_first_method → _undocumented → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_nested_class_first_method → _undocumented → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_nested_class_first_method → _undocumented → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 14 lines
    def test_nested_class_first_method(self, tmp_path):
        flagged = self._undocumented(
            tmp_path,
            """\
                class Outer:
                    class Inner:
                        ## @brief Innermost first method.
                        #  @version 1.0
                        def deep(self):
                            pass
            """,
        )
        assert flagged == []
Activity · 2 steps
lines 415–425flagged = self._undocumented( tmp_path, """\ class Outer: class Inner: ## @brief Innermost first method. # @version 1.0 def deep(self): pass """, )lines 426–426assert flagged == []

test_presence_message_c_style_for_c_file

test_guard_python.TestPythonPresenceCheck.test_presence_message_c_style_for_c_file(self, tmp_path)

tests/guard/test_guard_python.py:215

Checks

  • assert presence
  • assert "/**" in presence[0].message
  • assert "##" not in presence[0].message

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_presence_message_c_style_for_c_file → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_presence_message_c_style_for_c_file → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_presence_message_c_style_for_c_file → validate_file
REQ-DDB-GUARD-002inferredtest_presence_message_c_style_for_c_file → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_presence_message_c_style_for_c_file → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_presence_message_c_style_for_c_file → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_presence_message_c_style_for_c_file → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_presence_message_c_style_for_c_file → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_presence_message_c_style_for_c_file → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_presence_message_c_style_for_c_file → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_presence_message_c_style_for_c_file → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_presence_message_c_style_for_c_file → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_presence_message_c_style_for_c_file → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_presence_message_c_style_for_c_file → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_presence_message_c_style_for_c_file → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_presence_message_c_style_for_c_file → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_presence_message_c_style_for_c_file → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021inferredtest_presence_message_c_style_for_c_file → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_presence_message_c_style_for_c_file → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_presence_message_c_style_for_c_file → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_presence_message_c_style_for_c_file → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_presence_message_c_style_for_c_file → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_presence_message_c_style_for_c_file → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_presence_message_c_style_for_c_file → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_presence_message_c_style_for_c_file → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 10 lines
    def test_presence_message_c_style_for_c_file(self, tmp_path):
        c_file = tmp_path / "bad.c"
        c_file.write_text("int undoc(void) { return 0; }\n")
        violations = validate_file(str(c_file), CONFIG_DEFAULTS, no_git=True)
        presence = [v for v in violations if "no doxygen" in v.message]
        assert presence
        assert "/**" in presence[0].message
        assert "##" not in presence[0].message

Activity · 7 steps
lines 216–216c_file = tmp_path / "bad.c"lines 217–217c_file.write_text("int undoc(void) { return 0; }\n")lines 218–218violations = validate_file(str(c_file), CONFIG_DEFAULTS, no_git=True)lines 219–219presence = [v for v in violations if "no doxygen" in v.message]lines 220–220assert presencelines 221–221assert "/**" in presence[0].messagelines 222–222assert "##" not in presence[0].message

test_presence_message_includes_return_for_non_void

test_guard_python.TestPythonPresenceCheck.test_presence_message_includes_return_for_non_void(self, tmp_path)

tests/guard/test_guard_python.py:189

Checks

  • assert presence
  • assert "@return" in presence[0].message

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_presence_message_includes_return_for_non_void → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_presence_message_includes_return_for_non_void → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_presence_message_includes_return_for_non_void → validate_file
REQ-DDB-GUARD-002inferredtest_presence_message_includes_return_for_non_void → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_presence_message_includes_return_for_non_void → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_presence_message_includes_return_for_non_void → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_presence_message_includes_return_for_non_void → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_presence_message_includes_return_for_non_void → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_presence_message_includes_return_for_non_void → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_presence_message_includes_return_for_non_void → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_presence_message_includes_return_for_non_void → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_presence_message_includes_return_for_non_void → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_presence_message_includes_return_for_non_void → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_presence_message_includes_return_for_non_void → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_presence_message_includes_return_for_non_void → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_presence_message_includes_return_for_non_void → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_presence_message_includes_return_for_non_void → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021measuredtest_presence_message_includes_return_for_non_void → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_presence_message_includes_return_for_non_void → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_presence_message_includes_return_for_non_void → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_presence_message_includes_return_for_non_void → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_presence_message_includes_return_for_non_void → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_presence_message_includes_return_for_non_void → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_presence_message_includes_return_for_non_void → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_presence_message_includes_return_for_non_void → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 13 lines
    def test_presence_message_includes_return_for_non_void(self, tmp_path):
        py_file = tmp_path / "bad.py"
        py_file.write_text(
            dedent("""\
                def compute(x: int) -> int:
                    return x + 1
            """)
        )
        violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)
        presence = [v for v in violations if "no doxygen" in v.message]
        assert presence
        assert "@return" in presence[0].message
Activity · 6 steps
lines 190–190py_file = tmp_path / "bad.py"lines 191–196py_file.write_text( dedent("""\ def compute(x: int) -> int: return x + 1 """) )lines 197–197violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)lines 198–198presence = [v for v in violations if "no doxygen" in v.message]lines 199–199assert presencelines 200–200assert "@return" in presence[0].message

test_presence_message_omits_return_for_void

test_guard_python.TestPythonPresenceCheck.test_presence_message_omits_return_for_void(self, tmp_path)

tests/guard/test_guard_python.py:202

Checks

  • assert presence
  • assert "@return" not in presence[0].message

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_presence_message_omits_return_for_void → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_presence_message_omits_return_for_void → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_presence_message_omits_return_for_void → validate_file
REQ-DDB-GUARD-002inferredtest_presence_message_omits_return_for_void → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_presence_message_omits_return_for_void → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_presence_message_omits_return_for_void → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_presence_message_omits_return_for_void → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_presence_message_omits_return_for_void → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_presence_message_omits_return_for_void → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_presence_message_omits_return_for_void → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_presence_message_omits_return_for_void → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_presence_message_omits_return_for_void → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_presence_message_omits_return_for_void → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_presence_message_omits_return_for_void → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_presence_message_omits_return_for_void → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_presence_message_omits_return_for_void → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_presence_message_omits_return_for_void → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021measuredtest_presence_message_omits_return_for_void → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_presence_message_omits_return_for_void → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_presence_message_omits_return_for_void → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_presence_message_omits_return_for_void → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_presence_message_omits_return_for_void → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_presence_message_omits_return_for_void → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_presence_message_omits_return_for_void → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_presence_message_omits_return_for_void → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 13 lines
    def test_presence_message_omits_return_for_void(self, tmp_path):
        py_file = tmp_path / "bad.py"
        py_file.write_text(
            dedent("""\
                def emit(x: int) -> None:
                    print(x)
            """)
        )
        violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)
        presence = [v for v in violations if "no doxygen" in v.message]
        assert presence
        assert "@return" not in presence[0].message
Activity · 6 steps
lines 203–203py_file = tmp_path / "bad.py"lines 204–209py_file.write_text( dedent("""\ def emit(x: int) -> None: print(x) """) )lines 210–210violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)lines 211–211presence = [v for v in violations if "no doxygen" in v.message]lines 212–212assert presencelines 213–213assert "@return" not in presence[0].message

test_presence_message_python_style

test_guard_python.TestPythonPresenceCheck.test_presence_message_python_style(self, tmp_path)

tests/guard/test_guard_python.py:173

Checks

  • assert presence, "expected a presence violation"
  • assert "/**" not in msg, "C-style skeleton must not leak into Python suggestion"
  • assert "##" in msg
  • assert "@brief" in msg and "@version" in msg

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_presence_message_python_style → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_presence_message_python_style → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_presence_message_python_style → validate_file
REQ-DDB-GUARD-002inferredtest_presence_message_python_style → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_presence_message_python_style → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_presence_message_python_style → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_presence_message_python_style → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_presence_message_python_style → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_presence_message_python_style → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_presence_message_python_style → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_presence_message_python_style → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_presence_message_python_style → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_presence_message_python_style → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_presence_message_python_style → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_presence_message_python_style → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_presence_message_python_style → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_presence_message_python_style → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021measuredtest_presence_message_python_style → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_presence_message_python_style → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_presence_message_python_style → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_presence_message_python_style → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_presence_message_python_style → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_presence_message_python_style → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_presence_message_python_style → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_presence_message_python_style → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 16 lines
    def test_presence_message_python_style(self, tmp_path):
        py_file = tmp_path / "bad.py"
        py_file.write_text(
            dedent("""\
                def undoc() -> None:
                    pass
            """)
        )
        violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)
        presence = [v for v in violations if v.check == "presence" and "no doxygen" in v.message]
        assert presence, "expected a presence violation"
        msg = presence[0].message
        assert "/**" not in msg, "C-style skeleton must not leak into Python suggestion"
        assert "##" in msg
        assert "@brief" in msg and "@version" in msg
Activity · 9 steps
lines 174–174py_file = tmp_path / "bad.py"lines 175–180py_file.write_text( dedent("""\ def undoc() -> None: pass """) )lines 181–181violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)lines 182–182presence = [v for v in violations if v.check == "presence" and "no doxygen" in v.message]lines 183–183assert presence, "expected a presence violation"lines 184–184msg = presence[0].messagelines 185–185assert "/**" not in msg, "C-style skeleton must not leak into Python suggestion"lines 186–186assert "##" in msglines 187–187assert "@brief" in msg and "@version" in msg

test_prose_docstring_is_the_block_and_its_summary_the_brief

test_guard_python.TestPythonDocstringTags.test_prose_docstring_is_the_block_and_its_summary_the_brief(self)

PEP 257 leads (changed from upstream, which ignored an untagged docstring): the docstring documents the function, so only the missing revision tag is reported.

tests/guard/test_guard_python.py:264

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert functions[0].doxygen is not None
  • assert functions[0].doxygen.tags["brief"] == ["Just a prose docstring."]
  • assert "version" not in functions[0].doxygen.tags

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_prose_docstring_is_the_block_and_its_summary_the_brief → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_prose_docstring_is_the_block_and_its_summary_the_brief → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_prose_docstring_is_the_block_and_its_summary_the_brief → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021measuredtest_prose_docstring_is_the_block_and_its_summary_the_brief → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024measuredtest_prose_docstring_is_the_block_and_its_summary_the_brief → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_prose_docstring_is_the_block_and_its_summary_the_brief → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 17 lines
    def test_prose_docstring_is_the_block_and_its_summary_the_brief(self):
        """PEP 257 leads (changed from upstream, which ignored an untagged docstring): the
        docstring documents the function, so only the missing revision tag is reported."""
        content = dedent('''\
            def helper():
                """Just a prose docstring.

                More detail that is not the summary.
                """
                return 1
        ''')
        functions = parse_python(content)
        assert len(functions) == 1
        assert functions[0].doxygen is not None
        assert functions[0].doxygen.tags["brief"] == ["Just a prose docstring."]
        assert "version" not in functions[0].doxygen.tags
Activity · 6 steps
lines 267–274content = dedent('''\ def helper(): """Just a prose docstring. More detail that is not the summary. """ return 1 ''')lines 275–275functions = parse_python(content)lines 276–276assert len(functions) == 1lines 277–277assert functions[0].doxygen is not Nonelines 278–278assert functions[0].doxygen.tags["brief"] == ["Just a prose docstring."]lines 279–279assert "version" not in functions[0].doxygen.tags

test_regular_comment_not_doxygen

test_guard_python.TestPythonDoxygenBlocks.test_regular_comment_not_doxygen(self)

tests/guard/test_guard_python.py:71

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert functions[0].doxygen is None

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_regular_comment_not_doxygen → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_regular_comment_not_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_regular_comment_not_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021measuredtest_regular_comment_not_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_regular_comment_not_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_regular_comment_not_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 10 lines
    def test_regular_comment_not_doxygen(self):
        content = dedent("""\
            # just a regular comment
            def func():
                pass
        """)
        functions = parse_python(content)
        assert len(functions) == 1
        assert functions[0].doxygen is None
Activity · 4 steps
lines 72–76content = dedent("""\ # just a regular comment def func(): pass """)lines 77–77functions = parse_python(content)lines 78–78assert len(functions) == 1lines 79–79assert functions[0].doxygen is None

test_single_line_docstring_with_tags

test_guard_python.TestPythonDocstringTags.test_single_line_docstring_with_tags(self)

tests/guard/test_guard_python.py:308

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert dox is not None
  • assert dox.tags["brief"] == ["One-liner."]
  • assert dox.tags["version"] == ["1.0"]

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_single_line_docstring_with_tags → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_single_line_docstring_with_tags → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_single_line_docstring_with_tags → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021measuredtest_single_line_docstring_with_tags → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024measuredtest_single_line_docstring_with_tags → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_single_line_docstring_with_tags → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 13 lines
    def test_single_line_docstring_with_tags(self):
        content = dedent('''\
            def helper():
                """@brief One-liner. @version 1.0"""
                pass
        ''')
        functions = parse_python(content)
        assert len(functions) == 1
        dox = functions[0].doxygen
        assert dox is not None
        assert dox.tags["brief"] == ["One-liner."]
        assert dox.tags["version"] == ["1.0"]
Activity · 7 steps
lines 309–313content = dedent('''\ def helper(): """@brief One-liner. @version 1.0""" pass ''')lines 314–314functions = parse_python(content)lines 315–315assert len(functions) == 1lines 316–316dox = functions[0].doxygenlines 317–317assert dox is not Nonelines 318–318assert dox.tags["brief"] == ["One-liner."]lines 319–319assert dox.tags["version"] == ["1.0"]

test_single_line_doxygen

test_guard_python.TestPythonDoxygenBlocks.test_single_line_doxygen(self)

tests/guard/test_guard_python.py:108

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert functions[0].doxygen is not None
  • assert "brief" in functions[0].doxygen.tags
  • assert "version" in functions[0].doxygen.tags

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_single_line_doxygen → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_single_line_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_single_line_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_single_line_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_single_line_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_single_line_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 12 lines
    def test_single_line_doxygen(self):
        content = dedent("""\
            ## @brief Quick helper. @version 1.0
            def helper():
                pass
        """)
        functions = parse_python(content)
        assert len(functions) == 1
        assert functions[0].doxygen is not None
        assert "brief" in functions[0].doxygen.tags
        assert "version" in functions[0].doxygen.tags
Activity · 6 steps
lines 109–113content = dedent("""\ ## @brief Quick helper. @version 1.0 def helper(): pass """)lines 114–114functions = parse_python(content)lines 115–115assert len(functions) == 1lines 116–116assert functions[0].doxygen is not Nonelines 117–117assert "brief" in functions[0].doxygen.tagslines 118–118assert "version" in functions[0].doxygen.tags

test_three_tags_single_line

test_guard_python.TestPythonDoxygenBlocks.test_three_tags_single_line(self)

tests/guard/test_guard_python.py:120

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert tags["brief"] == ["Helper."]
  • assert tags["version"] == ["1.0"]
  • assert tags["req"] == ["REQ-001"]

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_three_tags_single_line → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_three_tags_single_line → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_three_tags_single_line → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021inferredtest_three_tags_single_line → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_three_tags_single_line → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_three_tags_single_line → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 13 lines
    def test_three_tags_single_line(self):
        content = dedent("""\
            ## @brief Helper. @version 1.0 @req REQ-001
            def helper():
                pass
        """)
        functions = parse_python(content)
        assert len(functions) == 1
        tags = functions[0].doxygen.tags
        assert tags["brief"] == ["Helper."]
        assert tags["version"] == ["1.0"]
        assert tags["req"] == ["REQ-001"]
Activity · 7 steps
lines 121–125content = dedent("""\ ## @brief Helper. @version 1.0 @req REQ-001 def helper(): pass """)lines 126–126functions = parse_python(content)lines 127–127assert len(functions) == 1lines 128–128tags = functions[0].doxygen.tagslines 129–129assert tags["brief"] == ["Helper."]lines 130–130assert tags["version"] == ["1.0"]lines 131–131assert tags["req"] == ["REQ-001"]

test_triple_hash_not_doxygen

test_guard_python.TestPythonDoxygenBlocks.test_triple_hash_not_doxygen(self)

tests/guard/test_guard_python.py:81

Show on the map →

Called by none

Calls parse_python

Checks

  • assert len(functions) == 1
  • assert functions[0].doxygen is None

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_triple_hash_not_doxygen → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_triple_hash_not_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_triple_hash_not_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021measuredtest_triple_hash_not_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_triple_hash_not_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_triple_hash_not_doxygen → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 10 lines
    def test_triple_hash_not_doxygen(self):
        content = dedent("""\
            ### Section header ###
            def func():
                pass
        """)
        functions = parse_python(content)
        assert len(functions) == 1
        assert functions[0].doxygen is None
Activity · 4 steps
lines 82–86content = dedent("""\ ### Section header ### def func(): pass """)lines 87–87functions = parse_python(content)lines 88–88assert len(functions) == 1lines 89–89assert functions[0].doxygen is None

test_undocumented_detected

test_guard_python.TestPythonDoxygenBlocks.test_undocumented_detected(self)

tests/guard/test_guard_python.py:64

Show on the map →

Called by none

Calls parse_python

Checks

  • assert by_name["undocumented_function"].doxygen is None
  • assert by_name["undocumented_method"].doxygen is None

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-GUARD-018measuredtest_undocumented_detected → parse_python → parse_lang → parse_functions
REQ-DDB-GUARD-019measuredtest_undocumented_detected → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_undocumented_detected → parse_python → parse_lang → parse_functions → parse_functions_ts
REQ-DDB-GUARD-021measuredtest_undocumented_detected → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-024inferredtest_undocumented_detected → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _is_rust_test_item
REQ-DDB-GUARD-025measuredtest_undocumented_detected → parse_python → parse_lang → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
Source · 7 lines
    def test_undocumented_detected(self):
        content = (FIXTURES_DIR / "python_simple.py").read_text()
        functions = parse_python(content)
        by_name = {f.name: f for f in functions}
        assert by_name["undocumented_function"].doxygen is None
        assert by_name["undocumented_method"].doxygen is None
Activity · 5 steps
lines 65–65content = (FIXTURES_DIR / "python_simple.py").read_text()lines 66–66functions = parse_python(content)lines 67–67by_name = {f.name: f for f in functions}lines 68–68assert by_name["undocumented_function"].doxygen is Nonelines 69–69assert by_name["undocumented_method"].doxygen is None

test_validate_file_python

test_guard_python.TestPythonPresenceCheck.test_validate_file_python(self)

tests/guard/test_guard_python.py:149

Checks

  • assert any("undocumented_function" in m for m in names_flagged)
  • assert any("undocumented_method" in m for m in names_flagged)

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-001inferredtest_validate_file_python → validate_file → get_file_at_revision → run_git → git_argv
REQ-DDB-CONFIG-009measuredtest_validate_file_python → validate_file → gate_exclusion
REQ-DDB-GUARD-001measuredtest_validate_file_python → validate_file
REQ-DDB-GUARD-002inferredtest_validate_file_python → validate_file → check_version_staleness
REQ-DDB-GUARD-003measuredtest_validate_file_python → validate_file → check_tags
REQ-DDB-GUARD-004measuredtest_validate_file_python → validate_file → check_req_coverage
REQ-DDB-GUARD-005measuredtest_validate_file_python → validate_file → check_return_presence
REQ-DDB-GUARD-006measuredtest_validate_file_python → validate_file → check_file_presence
REQ-DDB-GUARD-007measuredtest_validate_file_python → validate_file → check_duplicate_tags
REQ-DDB-GUARD-009inferredtest_validate_file_python → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version
REQ-DDB-GUARD-011inferredtest_validate_file_python → validate_file → check_req_coverage → _has_active_requirements → load_requirements_full
REQ-DDB-GUARD-013measuredtest_validate_file_python → validate_file → unconfigured_language
REQ-DDB-GUARD-014inferredtest_validate_file_python → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → parse_version
REQ-DDB-GUARD-016inferredtest_validate_file_python → validate_file → check_req_coverage → _has_active_requirements → filter_requirements_by_version → _summarise_id
REQ-DDB-GUARD-018measuredtest_validate_file_python → validate_file → parse_source_file
REQ-DDB-GUARD-019measuredtest_validate_file_python → validate_file → check_file_presence → _check_file_block_tags → parse_doxygen_tags
REQ-DDB-GUARD-020measuredtest_validate_file_python → validate_file → parse_content_for_file → language_for_file
REQ-DDB-GUARD-021measuredtest_validate_file_python → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _find_preceding_doxygen → _find_python_docstring_block
REQ-DDB-GUARD-023inferredtest_validate_file_python → validate_file → get_file_at_revision
REQ-DDB-GUARD-024inferredtest_validate_file_python → validate_file → check_file_presence → _check_file_block_tags → apply_autobrief
REQ-DDB-GUARD-025measuredtest_validate_file_python → validate_file → parse_content_for_file → parse_functions → parse_functions_ts → _collect_functions → _js_returns_void
REQ-DDB-GUARD-026measuredtest_validate_file_python → validate_file → check_bus_tags
REQ-DDB-GUARD-027inferredtest_validate_file_python → validate_file → check_req_exists → _uncheckable
REQ-DDB-PIPE-011measuredtest_validate_file_python → validate_file → gate_exclusion → binary_file
REQ-DDB-WIKI-054inferredtest_validate_file_python → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config → _string_list → all
Source · 11 lines
    def test_validate_file_python(self):
        violations = validate_file(
            str(FIXTURES_DIR / "python_simple.py"),
            CONFIG_DEFAULTS,
            no_git=True,
        )
        undoc = [v for v in violations if "no doxygen comment" in v.message]
        names_flagged = [v.message for v in undoc]
        assert any("undocumented_function" in m for m in names_flagged)
        assert any("undocumented_method" in m for m in names_flagged)
Activity · 5 steps
lines 150–154violations = validate_file( str(FIXTURES_DIR / "python_simple.py"), CONFIG_DEFAULTS, no_git=True, )lines 155–155undoc = [v for v in violations if "no doxygen comment" in v.message]lines 156–156names_flagged = [v.message for v in undoc]lines 157–157assert any("undocumented_function" in m for m in names_flagged)lines 158–158assert any("undocumented_method" in m for m in names_flagged)