diff options
author | Johannes Ranke <johannes.ranke@jrwb.de> | 2018-07-10 16:09:36 +0200 |
---|---|---|
committer | Johannes Ranke <johannes.ranke@jrwb.de> | 2018-07-10 16:09:36 +0200 |
commit | 6aa015db8eb5e72e7c5e82ef5efced1898e75acd (patch) | |
tree | 863036571ec4147192c93ada488e10a8e4faf58f /tests/testthat/test_PELMO.R | |
parent | a736ecc357889107b6e93f14cdf0c1ea4587817f (diff) | |
parent | 22b36c824fe5e1561868a649216fe079c6fbfb85 (diff) |
Merge branch 'master' of kolab:pfm
Diffstat (limited to 'tests/testthat/test_PELMO.R')
-rw-r--r-- | tests/testthat/test_PELMO.R | 10 |
1 files changed, 9 insertions, 1 deletions
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) { |