File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -48,17 +48,17 @@ if GRAPH_T == :coo
4848
4949 @testset " induced_subgraph" begin
5050 # Create a simple GNNGraph with two nodes and one edge
51- graph = GNNGraph () # Initialize graph
52- add_nodes! (graph, 2 ) # Add 2 nodes
53- add_edge! (graph, 1 , 2 ) # Add an edge from node 1 to node 2
54- graph. x = rand ( 10 , 2 ) # Assign random features to both nodes (10 features per node )
55-
51+ s = [ 1 ]
52+ t = [ 2 ]
53+ # ## TODO add data
54+ graph = GNNGraph ((s, t) )
55+
5656 # Induce subgraph on both nodes
5757 nodes = [1 , 2 ]
5858 subgraph = induced_subgraph (graph, nodes)
5959
6060 @test num_nodes (subgraph) == 2 # Subgraph should have 2 nodes
61- @test num_nodes (subgraph) == 1 # Subgraph should have 1 edge
61+ @test num_edges (subgraph) == 1 # Subgraph should have 1 edge
6262 # ## TODO @test subgraph.ndata.x == graph.x[:, nodes] # Features should match the original graph
6363 end
6464end
You can’t perform that action at this time.
0 commit comments