From c72bd8b5e9213d4efc498a8b99e148bba7bcbe78 Mon Sep 17 00:00:00 2001 From: Bagaev Dmitry Date: Fri, 24 Nov 2023 13:06:32 +0100 Subject: [PATCH] remove the global test option and use it locally instead --- test/distributions/distributions_setuptests.jl | 5 ++--- test/distributions/mv_normal_wishart_tests.jl | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/distributions/distributions_setuptests.jl b/test/distributions/distributions_setuptests.jl index e9fa7181..f1b544c0 100644 --- a/test/distributions/distributions_setuptests.jl +++ b/test/distributions/distributions_setuptests.jl @@ -58,7 +58,6 @@ function test_exponentialfamily_interface(distribution; test_fisherinformation_against_hessian = true, test_fisherinformation_against_jacobian = true, option_assume_no_allocations = false, - option_test_samples_logpdf = true ) T = ExponentialFamily.exponential_family_typetag(distribution) @@ -71,7 +70,7 @@ function test_exponentialfamily_interface(distribution; test_distribution_conversion && run_test_distribution_conversion(distribution; assume_no_allocations = option_assume_no_allocations) test_packing_unpacking && run_test_packing_unpacking(distribution) test_isproper && run_test_isproper(distribution; assume_no_allocations = option_assume_no_allocations) - test_basic_functions && run_test_basic_functions(distribution; assume_no_allocations = option_assume_no_allocations, test_samples_logpdf = option_test_samples_logpdf) + test_basic_functions && run_test_basic_functions(distribution; assume_no_allocations = option_assume_no_allocations) test_fisherinformation_properties && run_test_fisherinformation_properties(distribution) test_fisherinformation_against_hessian && run_test_fisherinformation_against_hessian(distribution; assume_no_allocations = option_assume_no_allocations) test_fisherinformation_against_jacobian && run_test_fisherinformation_against_jacobian(distribution; assume_no_allocations = option_assume_no_allocations) @@ -193,7 +192,7 @@ function run_test_isproper(distribution; assume_no_allocations = true) end end -function run_test_basic_functions(distribution; nsamples = 10, test_gradients = true, assume_no_allocations = true, test_samples_logpdf = true) +function run_test_basic_functions(distribution; nsamples = 10, test_gradients = true, test_samples_logpdf = true, assume_no_allocations = true) T = ExponentialFamily.exponential_family_typetag(distribution) ef = @inferred(convert(ExponentialFamilyDistribution, distribution)) diff --git a/test/distributions/mv_normal_wishart_tests.jl b/test/distributions/mv_normal_wishart_tests.jl index 35aa4da1..6a8bf3e6 100644 --- a/test/distributions/mv_normal_wishart_tests.jl +++ b/test/distributions/mv_normal_wishart_tests.jl @@ -19,11 +19,13 @@ end @testset let (d = MvNormalWishart(rand(dim), invS, rand(), ν)) ef = test_exponentialfamily_interface( d; - option_test_samples_logpdf = false, option_assume_no_allocations = false, + test_basic_functions = false, test_fisherinformation_against_hessian = false, - test_fisherinformation_against_jacobian = false, + test_fisherinformation_against_jacobian = false ) + + run_test_basic_functions(ef; assume_no_allocations = false, test_samples_logpdf = false) end end end