From 6422593b05ee236e4e90ff30bfc301ad6b3738fd Mon Sep 17 00:00:00 2001 From: Mykola Lukashchuk Date: Thu, 25 Jan 2024 15:21:29 +0100 Subject: [PATCH] test(refactor): simplify test for rand --- test/distributions/distributions_setuptests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/distributions/distributions_setuptests.jl b/test/distributions/distributions_setuptests.jl index a08d0ffa..6d3b638f 100644 --- a/test/distributions/distributions_setuptests.jl +++ b/test/distributions/distributions_setuptests.jl @@ -221,7 +221,7 @@ function run_test_basic_functions(distribution; nsamples = 10, test_gradients = @test @inferred(mean(ef)) ≈ mean(distribution) @test @inferred(var(ef)) ≈ var(distribution) @test @inferred(std(ef)) ≈ std(distribution) - @test size(ExponentialFamily.check_logpdf(variate_form(typeof(ef)), typeof(x), eltype(x), ef, rand(ef, 10))[2])[end] === 10 + @test size(rand(ef, 10))[end] === 10 @test rand(StableRNG(42), ef) ≈ rand(StableRNG(42), distribution) @test all(rand(StableRNG(42), ef, 10) .≈ rand(StableRNG(42), distribution, 10)) @test all(rand!(StableRNG(42), ef, [deepcopy(x) for _ in 1:10]) .≈ rand!(StableRNG(42), distribution, [deepcopy(x) for _ in 1:10]))