From 7e8d788d298b8e1492fd8f62d88456e99e0f5992 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 4 Jul 2019 08:10:33 +0200 Subject: Address failures of CRAN checks, improve NEWS Static documentation rebuilt by pkgdown --- tests/testthat/test_nafta.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/testthat/test_nafta.R') diff --git a/tests/testthat/test_nafta.R b/tests/testthat/test_nafta.R index 096287aa..8cb1895b 100644 --- a/tests/testthat/test_nafta.R +++ b/tests/testthat/test_nafta.R @@ -39,7 +39,9 @@ test_that("Test data from Appendix B are correctly evaluated", { expect_known_output(print(res), "NAFTA_SOP_Appendix_B.txt") plot_nafta <- function() plot(res) - vdiffr::expect_doppelganger("NAFTA SOP Appendix B", plot_nafta) + if(requireNamespace("vdiffr", quietly = TRUE)) { + vdiffr::expect_doppelganger("NAFTA SOP Appendix B", plot_nafta) + } }) test_that("Test data from Appendix D are correctly evaluated", { @@ -61,5 +63,7 @@ test_that("Test data from Appendix D are correctly evaluated", { expect_known_output(print(res), "NAFTA_SOP_Appendix_D.txt") plot_nafta <- function() plot(res) - vdiffr::expect_doppelganger("Plot NAFTA analysis", plot_nafta) + if(requireNamespace("vdiffr", quietly = TRUE)) { + vdiffr::expect_doppelganger("Plot NAFTA analysis", plot_nafta) + } }) -- cgit v1.2.1