From cb3695dd434b3a3273217fb22c5ffb86065ae96d Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 10 Jul 2018 17:57:33 +0200 Subject: EFSA PEC soil guidance from 2017 - Implement the new guidance as well as possible - Maintenance work addressing CRAN checks --- tests/testthat/test_PELMO.R | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/testthat/test_PELMO.R') diff --git a/tests/testthat/test_PELMO.R b/tests/testthat/test_PELMO.R index be0b410..49c03d3 100644 --- a/tests/testthat/test_PELMO.R +++ b/tests/testthat/test_PELMO.R @@ -45,6 +45,7 @@ test_that("PELMO runs are correctly set up", { } # Prepare runs in analogy to the test archive + skip_on_cran() PELMO_runs(runs, psm_dir = PELMO_base, execute = FALSE, evaluate = FALSE, overwrite = TRUE) # Check that input files are correctly generated in the right location @@ -70,6 +71,7 @@ test_that("PELMO runs can be run and give the expected result files", { skip("A wine installation is needed for this test") } + skip_on_cran() run_PELMO(runs, cores = 7) plm_files <- c("CHEM.PLM", "ECHO.PLM", @@ -89,8 +91,12 @@ test_that("PELMO runs can be run and give the expected result files", { new <- readLines(file.path(PELMO_base, "FOCUS", pp, plm)) test <- readLines(file.path(test_dir, pp, plm)) + # Don't check for differences in the PESTICIDE BALANCE ERROR + pest_balance_error <- suppressWarnings(grep("PESTICIDE BALANCE ERROR", new)) + # Suppress warnings about invalid strings in this locale caused by the files + # Check if the ouput files are correctly reproduced - expect_identical(new, test) + expect_identical(new[!pest_balance_error], test[!pest_balance_error]) } } } @@ -105,6 +111,7 @@ test_that("PELMO runs are correctly evaluated", { skip("A wine installation is needed for this test") } + skip_on_cran() # Check that if output is the same as in the test archive for (run in runs) { psm <- run$psm @@ -164,6 +171,7 @@ test_that("PECgw from FOCUS summary files can be reproduced", { if (!wine_installed) { skip("A wine installation is needed for this test") } + skip_on_cran() focus_summary <- list() for (run in runs) { -- cgit v1.2.1