Skip to content

Commit 2b36121

Browse files
committed
fix: fix tests
1 parent 5859d3d commit 2b36121

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

GNNGraphs/test/sampling.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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
6464
end

0 commit comments

Comments
 (0)