Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test laplacian lambda max #242

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions test/GNNGraphs/query.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@
t = [2, 3, 4, 5, 1, 5, 1, 2, 3, 4]
g = GNNGraph(s,t)
@test laplacian_lambda_max(g) ≈ Float32(1.809017)
data1 = [g for i in 1:5]
gall1 = Flux.batch(data1)
@test laplacian_lambda_max(gall1) ≈ [Float32(1.809017) for i in 1:5]
data2 = [rand_graph(10,20) for i in 1:3]
gall2 = Flux.batch(data2)
@test length(laplacian_lambda_max(gall2)) == 3
data = [g for i in 1:5]
gall = Flux.batch(data)
@test laplacian_lambda_max(gall) ≈ [Float32(1.809017) for i in 1:5]
@test length(laplacian_lambda_max(gall)) == 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@test length(laplacian_lambda_max(gall)) == 5

the length is already implicitly tested in the line above

end

@testset "adjacency_matrix" begin
Expand Down