aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat/test_nlme.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-04-08 09:57:53 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-04-08 09:57:53 +0200
commitd75cc396f3e93b06ba1c7a165543fe885ff9c69c (patch)
treea4126d566a9c53068d7c6430f89cbdf42698635c /tests/testthat/test_nlme.R
parentc5878e0c561a93f36f8fdc64d5839db2a0527572 (diff)
Make the nlme test file work with testthat
Diffstat (limited to 'tests/testthat/test_nlme.R')
-rw-r--r--tests/testthat/test_nlme.R7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/testthat/test_nlme.R b/tests/testthat/test_nlme.R
index b3c41f00..31db92e1 100644
--- a/tests/testthat/test_nlme.R
+++ b/tests/testthat/test_nlme.R
@@ -26,7 +26,11 @@ test_that("nlme_function works correctly", {
mean_dp <- mean_degparms(f)
grouped_data <- nlme_data(f)
+
nlme_f <- nlme_function(f)
+ # The following assignment was introduced for nlme as evaluated by testthat
+ # to find the function
+ assign("nlme_f", nlme_f, pos = globalenv())
m_nlme_raw <- nlme(value ~ SSasymp(time, 0, parent_0, log_k_parent_sink),
data = grouped_data,
@@ -58,6 +62,5 @@ test_that("nlme_function works correctly", {
m_nlme_mkin_up_2 <- update(m_nlme_mkin, random = parent_0 ~ 1)
expect_equal(m_nlme_raw_up_2$coefficients, m_nlme_mkin_up_2$coefficients)
- # update(m_nlme_mkin) # works
-
+ expect_silent(tmp <- update(m_nlme_mkin))
})

Contact - Imprint