From 25a9e7b1014d0b9bc956b45a5da61496a7b37ccf Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 15 May 2015 10:39:55 +0200 Subject: 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. --- tests/testthat/test_parent_only.R | 24 +++++++++++++++--------- 1 file 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)) -- cgit v1.2.1