From 459267997f786d1e1827847c27f2d9f67b61a49b Mon Sep 17 00:00:00 2001 From: Sebastian Henz <sebastian.henz@ufz.de> Date: Sun, 9 Feb 2020 21:08:15 +0100 Subject: [PATCH] Fix failing test under devtools::check() --- tests/testthat/test-options.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-options.R b/tests/testthat/test-options.R index e56a332..dc5945b 100644 --- a/tests/testthat/test-options.R +++ b/tests/testthat/test-options.R @@ -19,5 +19,9 @@ test_that("user options are not permanently changed by ecxsys()", { hormesis_concentration = 0.3 ) new_options <- options() - expect_identical(original_options, new_options) + + # When doing devtools::check() some additional options may get added while + # running the model. So limit the equality testing to the option names which + # were there originally. + expect_identical(original_options, new_options[names(original_options)]) }) -- GitLab