Skip to content

Commit 4367530

Browse files
committed
test: use specific skip() function
1 parent 8e1f4d5 commit 4367530

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/testthat/test-graphNEL.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
test_that("graphNEL conversion works", {
2-
if (!requireNamespace("graph", quietly = TRUE)) skip("No graph package")
2+
skip_if_not_installed("graph")
33

44
suppressPackageStartupMessages(library(graph, warn.conflicts = FALSE))
55

@@ -29,7 +29,7 @@ test_that("graphNEL conversion works", {
2929
})
3030

3131
test_that("graphNEL does not duplicate loop edges", {
32-
if (!requireNamespace("graph", quietly = TRUE)) skip("No graph package")
32+
skip_if_not_installed("graph")
3333

3434
mat <- matrix(c(1, 0.5, 0.5, 0), nrow = 2)
3535
dimnames(mat) <- list(c("A", "B"), c("A", "B"))

0 commit comments

Comments
 (0)