Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit41affe7

Browse files
committed
Skip tests if codetools is not installed (in knitr Suggests)
1 parent77530f9 commit41affe7

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

‎tests/testthat/test-utility.R‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,7 @@ test_that("file_executable returns TRUE for executable file", {
561561
test_that("wflow_dependson returns labels of cached chunks", {
562562

563563
skip_on_cran()
564+
skip_if_not_installed("codetools")
564565

565566
tmp_dir<- tempfile()
566567
fs::dir_create(tmp_dir)

‎tests/testthat/test-wflow_build.R‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ test_that("wflow_build deletes cache when delete_cache = TRUE", {
306306

307307
skip_on_cran()
308308
skip_on_os("windows")# Avoid errors due to long filenames
309+
skip_if_not_installed("codetools")
309310

310311
# Build a file that has cached chunks
311312
file_w_cache<- file.path(s$analysis,"cache.Rmd")

‎tests/testthat/test-wflow_html.R‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ test_that("wflow_html sends warning for outdated version of reticulate", {
489489
test_that("wflow_html sends warning if chunk caches without autodep", {
490490

491491
skip_on_cran()
492+
skip_if_not_installed("codetools")
492493

493494
tmp_dir<- tempfile()
494495
fs::dir_create(tmp_dir)

‎tests/testthat/test-wflow_publish.R‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ test_that("wflow_publish deletes cache when delete_cache = TRUE", {
204204

205205
skip_on_cran()
206206
skip_on_os("windows")# Avoid errors due to long filenames
207+
skip_if_not_installed("codetools")
207208

208209
# Build a file that has cached chunks
209210
file_w_cache<- file.path(s$analysis,"cache.Rmd")

‎tests/testthat/test-wflow_remove.R‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
source("setup.R")
44

55
skip_on_cran_windows()
6+
if (!requireNamespace("codetools",quietly=TRUE)) skip("codetools is not installed")
67

78
library("git2r")
89

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp