diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-04-08 09:57:53 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-04-08 09:57:53 +0200 |
commit | d75cc396f3e93b06ba1c7a165543fe885ff9c69c (patch) | |
tree | a4126d566a9c53068d7c6430f89cbdf42698635c /tests/testthat | |
parent | c5878e0c561a93f36f8fdc64d5839db2a0527572 (diff) |
Make the nlme test file work with testthat
Diffstat (limited to 'tests/testthat')
-rw-r--r-- | tests/testthat/FOCUS_2006_D.csf | 2 | ||||
-rw-r--r-- | tests/testthat/test_nlme.R | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/testthat/FOCUS_2006_D.csf b/tests/testthat/FOCUS_2006_D.csf index f492a57f..118f61f4 100644 --- a/tests/testthat/FOCUS_2006_D.csf +++ b/tests/testthat/FOCUS_2006_D.csf @@ -5,7 +5,7 @@ Description: MeasurementUnits: % AR TimeUnits: days Comments: Created using mkin::CAKE_export -Date: 2020-04-07 +Date: 2020-04-08 Optimiser: IRLS [Data] 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)) }) |