aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2015-05-15 10:39:55 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2015-05-15 10:39:55 +0200
commit25a9e7b1014d0b9bc956b45a5da61496a7b37ccf (patch)
treecc7de9074bbe238436e998bf167725e8e014e4a6 /tests/testthat
parent656466946f093617ababebe5ec3b36809234112a (diff)
Skip testing FOMC with FOCUS A Windows
Testing the package on winbuilder shows that the Port algorithm does not converge on Windows with this combination, which is not a problem as the FOMC model is not appropriate for the dataset anyways.
Diffstat (limited to 'tests/testthat')
-rw-r--r--tests/testthat/test_parent_only.R24
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/testthat/test_parent_only.R b/tests/testthat/test_parent_only.R
index 2ed38ffa..b022fe4e 100644
--- a/tests/testthat/test_parent_only.R
+++ b/tests/testthat/test_parent_only.R
@@ -51,15 +51,21 @@ test_that("Fits for FOCUS A deviate less than 0.1% from median of values from FO
dev.percent.A.SFO <- calc_dev.percent(fit.A.SFO, median.A.SFO)
expect_equivalent(dev.percent.A.SFO[[1]] < 0.1, rep(TRUE, 4))
- fit.A.FOMC <- list(mkinfit("FOMC", FOCUS_2006_A, quiet = TRUE))
-
- median.A.FOMC <- as.numeric(lapply(subset(FOCUS_2006_FOMC_ref_A_to_F,
- dataset == "A",
- c(M0, alpha, beta, DT50, DT90)), "median"))
-
- dev.percent.A.FOMC <- calc_dev.percent(fit.A.FOMC, median.A.FOMC)
- #expect_equivalent(dev.percent.A.FOMC[[1]] < 0.1, rep(TRUE, 5)) # alpha and beta ill-determined
- expect_equivalent(dev.percent.A.FOMC[[1]][c(1, 4, 5)] < 0.1, rep(TRUE, 3))
+ # Fitting FOCUS A with FOMC is possible, but the correlation between
+ # alpha and beta obtained on Linux is 1.0000, and the test failed on Windows,
+ # as the Port algorithm did not converge (winbuilder, 2015-05-15)
+ if (.Platform$OS.type != "windows") {
+ fit.A.FOMC <- list(mkinfit("FOMC", FOCUS_2006_A, quiet = TRUE))
+
+
+ median.A.FOMC <- as.numeric(lapply(subset(FOCUS_2006_FOMC_ref_A_to_F,
+ dataset == "A",
+ c(M0, alpha, beta, DT50, DT90)), "median"))
+
+ dev.percent.A.FOMC <- calc_dev.percent(fit.A.FOMC, median.A.FOMC)
+ # alpha and are beta ill-determined, do not compare those
+ expect_equivalent(dev.percent.A.FOMC[[1]][c(1, 4, 5)] < 0.1, rep(TRUE, 3))
+ }
fit.A.DFOP <- list(mkinfit("DFOP", FOCUS_2006_A, quiet = TRUE))

Contact - Imprint