From 31aae86e9b36e54658fd725195f599e79528faa5 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Tue, 18 Jul 2023 17:14:55 -0700 Subject: [PATCH 1/2] Optionally skip tests requiring 'codetools' --- tests/testthat/test-bioc.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test-bioc.R b/tests/testthat/test-bioc.R index db4e0edc..ec1709b7 100644 --- a/tests/testthat/test-bioc.R +++ b/tests/testthat/test-bioc.R @@ -10,6 +10,7 @@ test_that("bioc is standalone", { funs <- Filter(function(x) is.function(stenv[[x]]), objs) funobjs <- mget(funs, stenv) + skip_if_not_installed("codetools") expect_message( mapply(codetools::checkUsage, funobjs, funs, MoreArgs = list(report = message)), From 1a784a4eceaaf0317fcfb057fd6f12dc759c4d10 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Tue, 18 Jul 2023 17:15:34 -0700 Subject: [PATCH 2/2] Update test-json.R --- tests/testthat/test-json.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test-json.R b/tests/testthat/test-json.R index 3ebf29a8..6031007e 100644 --- a/tests/testthat/test-json.R +++ b/tests/testthat/test-json.R @@ -10,6 +10,7 @@ test_that("JSON is standalone", { funs <- Filter(function(x) is.function(stenv[[x]]), objs) funobjs <- mget(funs, stenv) + skip_if_not_installed("codetools") expect_message( mapply(codetools::checkUsage, funobjs, funs, MoreArgs = list(report = message)),