From a2d506b6428c0aee55f8141c0ad2b04f3bc499fe Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Fri, 11 Oct 2024 20:40:45 +0200 Subject: [PATCH] fix: fix test --- GNNGraphs/test/sampling.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GNNGraphs/test/sampling.jl b/GNNGraphs/test/sampling.jl index c9c12634c..8a1044b27 100644 --- a/GNNGraphs/test/sampling.jl +++ b/GNNGraphs/test/sampling.jl @@ -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]