diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2022-10-26 09:36:44 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2022-10-26 09:36:44 +0200 |
commit | d25974f643ee46b7cd5ccd8331dd7bb0b14ab27a (patch) | |
tree | 47747ea2adfefd0099bd74fc4385412add6ed795 /tests/testthat | |
parent | 3c5b2596daef4ed0ee5c38a7141fdf48dbe7c070 (diff) |
Don't test parhist and llhist on travis, docs
Diffstat (limited to 'tests/testthat')
-rw-r--r-- | tests/testthat/test_multistart.R | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/testthat/test_multistart.R b/tests/testthat/test_multistart.R index e5b44e78..e4885191 100644 --- a/tests/testthat/test_multistart.R +++ b/tests/testthat/test_multistart.R @@ -4,20 +4,30 @@ test_that("multistart works for saem.mmkin models", { set.seed(123456) saem_sfo_s_multi <- multistart(sfo_saem_1_reduced, n = 8, cores = n_cores, no_random_effect = "parent_0") + anova_sfo <- anova(sfo_saem_1, + sfo_saem_1_reduced, + best(saem_sfo_s_multi), + test = TRUE + ) + expect_true(anova_sfo[3, "Pr(>Chisq)"] > 0.5) - llhist_sfo <- function() llhist(saem_sfo_s_multi) - parhist_sfo <- function() parhist(saem_sfo_s_multi, ylim = c(0.5, 2)) - vdiffr::expect_doppelganger("llhist for sfo fit", llhist_sfo) - vdiffr::expect_doppelganger("parhist for sfo fit", parhist_sfo) - + skip_on_cran() # Save CRAN time set.seed(123456) saem_biphasic_m_multi <- multistart(saem_biphasic_m, n = 8, cores = n_cores) expect_known_output(print(saem_biphasic_m_multi), file = "print_multistart_biphasic.txt") - skip_on_cran() - skip_on_travis() + anova_biphasic <- anova(saem_biphasic_m, + best(saem_biphasic_m_multi)) + + expect_true(anova_biphasic[2, "AIC"] < anova_biphasic[1, "AIC"]) + skip_on_travis() # Plots are platform dependent + + llhist_sfo <- function() llhist(saem_sfo_s_multi) + parhist_sfo <- function() parhist(saem_sfo_s_multi, ylim = c(0.5, 2)) + vdiffr::expect_doppelganger("llhist for sfo fit", llhist_sfo) + vdiffr::expect_doppelganger("parhist for sfo fit", parhist_sfo) llhist_biphasic <- function() llhist(saem_biphasic_m_multi) parhist_biphasic <- function() parhist(saem_biphasic_m_multi, |