Skip to content

Commit

Permalink
fix: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
askorupka committed Oct 11, 2024
1 parent 2f528aa commit a2d506b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions GNNGraphs/test/sampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ if GRAPH_T == :coo
@test subgraph.ndata.y == graph.ndata.y
@test subgraph.edata == graph.edata

nodes = [1, 2]
subgraph = Graphs.induced_subgraph(graph, nodes)

@test subgraph.num_nodes == 2
@test subgraph.num_edges == 1
@test subgraph.ndata == getobs(graph.ndata, [1, 2])
@test subgraph.edata.e == getobs(graph.edata, 1)

graph = GNNGraph(2)
graph = add_edges(graph, ([2], [1]))
nodes = [1]
Expand Down

0 comments on commit a2d506b

Please sign in to comment.