From 5d7218c7c597af23296d4e78464af0d54bbd2256 Mon Sep 17 00:00:00 2001 From: Alex Zwanenburg Date: Sat, 21 Sep 2024 16:01:06 +0200 Subject: [PATCH] Added two checks for noSuggests test. --- tests/testthat/test-stratification.R | 3 ++- tests/testthat/test-transformation.R | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-stratification.R b/tests/testthat/test-stratification.R index 7641a2a5..6558065c 100644 --- a/tests/testthat/test-stratification.R +++ b/tests/testthat/test-stratification.R @@ -3,7 +3,8 @@ testthat::skip_on_cran() # Find available stratification methods. stratification_methods <- familiar:::.get_available_stratification_methods() -if (!test_data_package_installed("survival")) testthat::skip() +if (!familiar::test_data_package_installed("survival")) testthat::skip() +if (!rlang::is_installed("power.transform")) testthat::skip() # Test for good dataset. for (stratification_method in stratification_methods) { diff --git a/tests/testthat/test-transformation.R b/tests/testthat/test-transformation.R index 9f7c9bfb..a8448f21 100644 --- a/tests/testthat/test-transformation.R +++ b/tests/testthat/test-transformation.R @@ -1,3 +1,5 @@ +if (!rlang::is_installed("power.transform")) testthat::skip() + # Generic test ----------------------------------------------------------------- outcome_type <- "survival"