From 636c585895aacaae95d739201e856252f24fec1b Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 8 Apr 2020 10:49:32 +0200 Subject: Use two assignments to avoid skipping another test --- tests/testthat/test_tests.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/testthat/test_tests.R') diff --git a/tests/testthat/test_tests.R b/tests/testthat/test_tests.R index ddf8e1a0..3d1c136c 100644 --- a/tests/testthat/test_tests.R +++ b/tests/testthat/test_tests.R @@ -57,7 +57,11 @@ test_that("Updating fitted models works", { }) test_that("We can do a likelihood ratio test using an update specification", { - skip("This errors out if called by testthat while it works in a normal R session") + # The following two assignments were made so the update.mkinfit function called + # by lrtest.mkinfit finds these objects when lrtest.mkinfit is called by + # testthat + assign("f_2_mkin", f_2_mkin, globalenv()) + assign("DFOP_par_c", DFOP_par_c, globalenv()) test_2_mkin_k2 <- lrtest(f_2_mkin, fixed_parms = c(k2 = 0)) expect_equivalent(test_2_mkin_k2[["2", "Pr(>Chisq)"]], 4.851e-8, tolerance = 1e-8) test_2_mkin_tc <- lrtest(f_2_mkin, error_model = "tc") -- cgit v1.2.1