File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
tests/unit/experimental/components Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 39
39
40
40
@pytest .fixture (scope = "module" )
41
41
def lexical_graph_config () -> LexicalGraphConfig :
42
- return LexicalGraphConfig ()
42
+ return LexicalGraphConfig (
43
+ chunk_node_label = "Paragraph" ,
44
+ )
43
45
44
46
45
47
@pytest .mark .parametrize (
@@ -165,6 +167,20 @@ def test_graph_pruning_validate_node(
165
167
assert result is None
166
168
167
169
170
+ def test_graph_pruning_enforce_nodes_lexical_graph (lexical_graph_config : LexicalGraphConfig ) -> None :
171
+ pruner = GraphPruning ()
172
+ result = pruner ._enforce_nodes (
173
+ extracted_nodes = [
174
+ Neo4jNode (id = "1" , label = "Paragraph" ),
175
+ ],
176
+ schema = GraphSchema (additional_node_types = False ),
177
+ lexical_graph_config = lexical_graph_config ,
178
+ pruning_stats = PruningStats (),
179
+ )
180
+ assert len (result ) == 1
181
+ assert result [0 ].label == "Paragraph"
182
+
183
+
168
184
@pytest .fixture
169
185
def neo4j_relationship () -> Neo4jRelationship :
170
186
return Neo4jRelationship (
You can’t perform that action at this time.
0 commit comments