aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2017-01-30 14:11:34 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2017-01-30 14:11:34 +0100
commit826cf9a2687ff1d7ca5b568882f5686f76f82074 (patch)
tree44b1d8516fc481c813da284647dd532f0c093fb1 /tests
parenteea72720956dc8358fac98b29c9a627a9363cbd2 (diff)
Use relative tolerance of 1e-6 for flux test
to pass test also for more extreme situations as in the current test data.
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/test_PELMO.R4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/testthat/test_PELMO.R b/tests/testthat/test_PELMO.R
index ab0e37a..a08f607 100644
--- a/tests/testthat/test_PELMO.R
+++ b/tests/testthat/test_PELMO.R
@@ -119,12 +119,14 @@ test_that("PELMO runs are correctly evaluated", {
period_pfm_file <- file.path(PELMO_base, "FOCUS", pp, "period_pfm.rda")
load(period_pfm_file)
+ #message(psm, " ", crop, " ", scenario)
+
# Test for equality of all the components separately,
# as we need to adapt the tolerance
for (acronym in acronyms) {
p_pelmo <- results[[acronym]]$periods
p_test <- results_pfm[[acronym]]$periods
- expect_equal(p_test$flux, p_pelmo$flux, tol = 1e-6, scale = 1)
+ expect_equal(p_test$flux, p_pelmo$flux, tol = 1e-6)
expect_equal(p_test$percolate, p_pelmo$percolate)
# PELMO sets the concentration to 0 when the percolate is zero.
# We get NaN, which is more reasonable, but we need to

Contact - Imprint