Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/testthat/test-centrality.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ test_that("hits_scores(scale = ) is deprecated but still works", {
rlang::local_options(lifecycle_verbosity = "warning")
g <- make_star(10)

expect_snapshot(
expect_snapshot_igraph(
res_legacy <- hits_scores(g, scale = FALSE)
)
# ARPACK starts from a random vector, so compare with a tolerance.
Expand All @@ -186,7 +186,7 @@ test_that("hits_scores(scale = ) is deprecated but still works", {
hits_scores(g, normalized = FALSE)[c("hub", "authority")]
)

expect_snapshot(
expect_snapshot_igraph(
error = TRUE,
hits_scores(g, normalized = FALSE, scale = FALSE)
)
Expand Down Expand Up @@ -1330,7 +1330,7 @@ test_that("alpha_centrality() covers migrated tail args and positional recovery"
test_that("closeness(vids = ) is deprecated but still works", {
rlang::local_options(lifecycle_verbosity = "warning")
g <- make_ring(10)
expect_snapshot(
expect_snapshot_igraph(
res_legacy <- closeness(g, vids = 1:3)
)
expect_identical(res_legacy, closeness(g, vertices = 1:3))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-games.R
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ test_that("sample_grg(nodes = ) is deprecated but still works", {
igraph_local_seed(42)
expected <- sample_grg(n = 10, radius = 1)
igraph_local_seed(42)
expect_snapshot(
expect_snapshot_igraph(
g <- sample_grg(nodes = 10, radius = 1)
)
expect_identical_graphs(g, expected)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-interface.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ test_that("legacy matrix warnings name the calling package (#1827)", {
test_that("add_edges warning for legacy matrices", {
rlang::local_options(lifecycle_verbosity = "warning")
g <- make_empty_graph(5)
expect_snapshot({
expect_snapshot_igraph({
. <- add_edges(g, matrix(c(1, 2, 3, 4), nrow = 2))
. <- add_edges(g, matrix(c(1, 2, 1, 3, 1, 4), nrow = 2))
. <- add_edges(g, matrix(1:4, nrow = 1))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-make.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test_that("make_graph() warns for 2xn and 2x2 matrices and reads them by column

test_that("make_graph() warning for legacy matrices", {
rlang::local_options(lifecycle_verbosity = "warning")
expect_snapshot(. <- make_graph(t(cbind(1, 2:4))))
expect_snapshot_igraph(. <- make_graph(t(cbind(1, 2:4))))
})

test_that("make_ works with n parameter", {
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-migration-fixture.R
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,9 @@ test_that("an old head name followed by a positional value keeps the old order",

test_that("positional old tail arguments are recovered on the same path", {
rlang::local_options(lifecycle_verbosity = "warning")
expect_snapshot(res <- migration_fixture_rename("g", from = 1, 2, "in", TRUE))
expect_snapshot_igraph(
res <- migration_fixture_rename("g", from = 1, 2, "in", TRUE)
)
expect_equal(
res,
list(graph = "g", vertices = 1, to = 2, type = "in", directed = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-structural-properties.R
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ test_that("knn() tail arguments and legacy positional recovery", {
test_that("degree(v = ) is deprecated but still works", {
rlang::local_options(lifecycle_verbosity = "warning")
g <- make_ring(10)
expect_snapshot(
expect_snapshot_igraph(
res_legacy <- degree(g, v = 1:3)
)
expect_identical(res_legacy, degree(g, vertices = 1:3))
Expand Down
Loading