From 7606225974fb6b116cb67bd523b4d9345bceade5 Mon Sep 17 00:00:00 2001 From: Eva Rifa Date: Wed, 22 Mar 2023 16:18:31 +0100 Subject: [PATCH] Uncumment test that was failing due to an error in s2dv that has been corrected in the new version 1.4.0 --- tests/testthat/test-CST_MultivarRMSE.R | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/testthat/test-CST_MultivarRMSE.R b/tests/testthat/test-CST_MultivarRMSE.R index c4ca5d5f..b9f93f68 100644 --- a/tests/testthat/test-CST_MultivarRMSE.R +++ b/tests/testthat/test-CST_MultivarRMSE.R @@ -151,9 +151,9 @@ test_that("2. Output checks", { res2 <- CST_MultivarRMSE(exp = ano_exp, obs = ano_obs, weight = c(1, 2), dat_dim = 'datasets', ftime_dim = 'ftimes', memb_dim = 'members', sdate_dim = 'sdates') - # res3 <- CST_MultivarRMSE(exp = ano_exp, obs = ano_obs, weight = c(1, 2), - # dat_dim = NULL, ftime_dim = 'ftimes', - # memb_dim = 'members', sdate_dim = 'sdates') + res3 <- CST_MultivarRMSE(exp = ano_exp, obs = ano_obs, weight = c(1, 2), + dat_dim = NULL, ftime_dim = 'ftimes', + memb_dim = 'members', sdate_dim = 'sdates') expect_equal( names(res1), c('data', 'coords', 'attrs') @@ -180,13 +180,13 @@ test_that("2. Output checks", { c(0.9184747, 1.0452328, 1.7559577, 0.7936543, 0.9163216), tolerance = 0.0001 ) - # expect_equal( - # dim(res3$data), - # c(datasets = 1, lat = 6, lon = 7) - # ) - # expect_equal( - # as.vector(res3$data)[1:5], - # c(0.9184747, 1.0452328, 1.7559577, 0.7936543, 0.9163216), - # tolerance = 0.0001 - # ) + expect_equal( + dim(res3$data), + c(datasets = 1, lat = 6, lon = 7) + ) + expect_equal( + as.vector(res3$data)[1:5], + c(0.9184747, 1.0452328, 1.7559577, 0.7936543, 0.9163216), + tolerance = 0.0001 + ) }) -- GitLab