Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
test(graph): expect a self edge for C++ recursion through a header declaration (#4866)
Swati Ahujaf0f0c5725058
diff --git a/tests/unit/ingestion/test_cpp_class_scope_calls.py b/tests/unit/ingestion/test_cpp_class_scope_calls.pyindex f9c53ef5c..cc3595113 100644--- a/tests/unit/ingestion/test_cpp_class_scope_calls.py+++ b/tests/unit/ingestion/test_cpp_class_scope_calls.py@@ -81,10 +81,10 @@ class TestOwnClassAcrossFiles:# The same file's derived-class bodies are not the caller's class.assert "disk.cc::RealDiskInterface::MakeDir" not in calls- def test_recursion_through_the_header_draws_no_edge(self, tmp_path: Path) -> None:+ def test_recursion_is_a_self_edge_never_the_header_declaration(self, tmp_path: Path) -> None:graph = _build(tmp_path, {"disk.h": _DISK_H, "disk.cc": _DISK_CC})calls = _calls(graph, "disk.cc::DiskInterface::MakeDirs")- assert not any(t.endswith("::MakeDirs") for t in calls)+ assert [t for t in calls if t.endswith("::MakeDirs")] == ["disk.cc::DiskInterface::MakeDirs"]def test_inline_body_reaches_a_member_defined_out_of_line(self, tmp_path: Path) -> None:header = (