Orchestrata Ultimate › Tests › Reference › knowledge_graph › test_kg_sync_edges

Tests reference — tests/knowledge_graph/test_kg_sync_edges.py

Module of tests/knowledge_graph, split out because the directory page would be too large.

Prose pending.

tests/knowledge_graph/test_kg_sync_edges.py

source · 14 tests · 491 lines

Real-Neo4j tests for KG-sync DEFINES / CONTAINS edges + node properties.

Covers: core.tracing.traceability, session.kg_sync/ (package)

Kind Name Line Description
class TestDefinesEdges 198 File-[:DEFINES]->Class and File-[:DEFINES]->(top-level)Function.
method TestDefinesEdges.test_file_defines_class_endpoints 201 DEFINES edge runs File(widget.py) -> Class(WidgetService).
method TestDefinesEdges.test_file_defines_top_level_function_endpoints 216 DEFINES edge runs File -> Function for the top-level function.
method TestDefinesEdges.test_method_is_not_defines_target 237 A method (make) must NOT be a File-DEFINES target (it's DEFINES).
method TestDefinesEdges.test_defines_edges_in_subpackage 258 The sub-package's helper.py DEFINES its top-level function too.
class TestContainsEdges 276 Directory-[:CONTAINS]->Directory and Directory-[:CONTAINS]->File.
method TestContainsEdges.test_directory_contains_child_directory 279 Parent dir CONTAINS its child dir, with correct path endpoints.
method TestContainsEdges.test_directory_contains_file 314 The src directory CONTAINS widget.py, endpoints verified.
method TestContainsEdges.test_nested_file_contained_by_subdir 330 helper.py is CONTAINED by src/sub, not by src.
method TestContainsEdges.test_every_file_has_exactly_one_container 347 Each File node has exactly one incoming Directory-CONTAINS edge.
class TestNodeProperties 374 Properties the sync writes but no other test verifies.
method TestNodeProperties.test_class_node_properties 377 Class carries decorators/line/file_path/module_id/docstring/project_id.
method TestNodeProperties.test_top_level_function_node_properties 399 Top-level Function carries file_path/module_id/line; class_id is null.
method TestNodeProperties.test_method_function_carries_class_id 420 A method Function carries class_id but no file_path/module_id.
method TestNodeProperties.test_file_node_properties 440 File carries line_count/hash/dir_path/language/updated_at.
method TestNodeProperties.test_directory_node_properties 461 Directory carries name/parent_path/project_id/updated_at.
method TestNodeProperties.test_root_directory_has_null_parent_path 478 The root '.' Directory has parent_path = null (it has no parent).