diff --git a/test/GWR.jl b/test/GWR.jl index fff5e76..6cc0869 100644 --- a/test/GWR.jl +++ b/test/GWR.jl @@ -10,11 +10,13 @@ n_assets = size(prices, 1) @testset "GWR.jl" begin @testset "With default arguments" begin model = gwr(prices, h) - @test sum(model.b, dims=1) .|> isapprox(1.0, atol=1e-2) |> all + @show sum(model.b, dims=1) + @test sum(model.b, dims=1) .|> isapprox(1.0) |> all @test model.n_assets == n_assets == size(model.b, 1) @test (model.b[:, 1] .== 1/n_assets) |> all model = gwr(prices, h, [1, 2, 3]) + @show sum(model.b, dims=1) @test sum(model.b, dims=1) .|> isapprox(1.0) |> all @test model.n_assets == n_assets == size(model.b, 1) @test (model.b[:, 1] .== 1/n_assets) |> all @@ -22,12 +24,14 @@ n_assets = size(prices, 1) @testset "With custom arguments" begin model = gwr(prices, h, 1, 20, 0.01) - @test sum(model.b, dims=1) .|> isapprox(1.0, atol=1e-2) |> all + @show sum(model.b, dims=1) + @test sum(model.b, dims=1) .|> isapprox(1.0) |> all @test model.n_assets == n_assets == size(model.b, 1) @test (model.b[:, 1] .== 1/n_assets) |> all model = gwr(prices, h, [2, 3, 3.2], 20, 0.01) - @test sum(model.b, dims=1) .|> isapprox(1.0, atol=1e-2) |> all + @show sum(model.b, dims=1) + @test sum(model.b, dims=1) .|> isapprox(1.0) |> all @test model.n_assets == n_assets == size(model.b, 1) @test (model.b[:, 1] .== 1/n_assets) |> all end