diff --git a/R/iterators.R b/R/iterators.R index e28db7c5475..51bbd9e5310 100644 --- a/R/iterators.R +++ b/R/iterators.R @@ -1421,6 +1421,19 @@ print.igraph.vs <- function( full = igraph_opt("print.full"), id = igraph_opt("print.id"), ... +) { + if (!is_cli_style()) { + return(print_igraph_vs_legacy(x, full = full, id = id, ...)) + } + + print_igraph_vs_cli(x, full = full, id = id, ...) +} + +print_igraph_vs_legacy <- function( + x, + full = igraph_opt("print.full"), + id = igraph_opt("print.id"), + ... ) { graph <- get_vs_graph(x) if (!is.null(graph)) { @@ -1538,6 +1551,19 @@ print.igraph.es <- function( full = igraph_opt("print.full"), id = igraph_opt("print.id"), ... +) { + if (!is_cli_style()) { + return(print_igraph_es_legacy(x, full = full, id = id, ...)) + } + + print_igraph_es_cli(x, full = full, id = id, ...) +} + +print_igraph_es_legacy <- function( + x, + full = igraph_opt("print.full"), + id = igraph_opt("print.id"), + ... ) { graph <- get_es_graph(x) ml <- if (identical(full, TRUE)) NULL else igraph_opt("auto.print.lines") @@ -1552,6 +1578,161 @@ print.igraph.es <- function( invisible(x) } +# cli-styled printing for vertex/edge sequences ----------------- + +print_igraph_vs_cli <- function( + x, + full = igraph_opt("print.full"), + id = igraph_opt("print.id"), + ... +) { + graph <- get_vs_graph(x) + vertices <- if (!is.null(graph)) V(graph) else NULL + total <- if (is.null(vertices)) "?" else as.character(length(vertices)) + graph_id_short <- graph_id(x) + + middot <- middot_cli() + # `id` comes from an option and may be NULL/NA, so guard with isTRUE(). + flags <- c( + if (!is.null(vertices) && !is.null(names(vertices))) "named", + if (isTRUE(id) && !is.na(graph_id_short)) { + paste("from", substr(graph_id_short, 1, 7)) + }, + if (is.null(graph)) "deleted" + ) + + title <- paste0( + " ", + length(x), + "/", + total, + flag_suffix_cli(flags, middot) + ) + cli_section(title, blank = FALSE) + + # A vertex sequence prints in one of two layouts: + # + # * detailed -- one row per selected vertex with every vertex attribute as + # a column (a metadata table); produced by `V(g)[[...]]`. + # * compact -- a bare list of vertex ids, or names when present; produced + # by `V(g)[...]`. + # + # `[[` and `[` build the *same* underlying sequence: `[[.igraph.vs` merely + # tags its result with a "single" attribute, which is_single_index() reads + # here. So the only signal asking for the detailed view is that flag. We use + # the table only when it is set AND the graph is still alive (a sequence can + # outlive its graph) AND the graph actually has attributes to tabulate; + # anything else falls through to the compact list below. + if ( + is_single_index(x) && + !is.null(graph) && + length(vertex_attr_names(graph)) > 0 + ) { + vertex_attrs <- vertex_attr(graph) + # A data.frame needs flat columns, so it works only when every attribute is + # atomic. If any attribute is list-valued, drop to a named list sliced to + # the selected vertices instead of forcing it into a table. + if (all(vapply(vertex_attrs, is.atomic, logical(1)))) { + print(as.data.frame(vertex_attrs, stringsAsFactors = FALSE)[ + as.vector(x), + , + drop = FALSE + ]) + } else { + print(lapply(vertex_attrs, "[", as.vector(x))) + } + } else { + # Otherwise just list the vertices (by name when available). + if (!is.null(names(vertices))) { + x2 <- names(vertices)[as.vector(x)] + if (!is.null(names(x)) && !identical(names(x), x2)) { + names(x2) <- names(x) + } + } else { + x2 <- as.vector(x) + } + if (length(x2)) { + max_lines <- if (isTRUE(full)) NULL else igraph_opt("auto.print.lines") + print_cli_lines(x2, max_lines, "+ ... omitted several vertices\n") + } + } + + invisible(x) +} + +print_igraph_es_cli <- function( + x, + full = igraph_opt("print.full"), + id = igraph_opt("print.id"), + ... +) { + graph <- get_es_graph(x) + total <- if (is.null(graph)) "?" else as.character(gsize(graph)) + graph_id_short <- graph_id(x) + has_vnames <- !is.null(attr(x, "vnames")) + + middot <- middot_cli() + # `id` comes from an option and may be NULL/NA, so guard with isTRUE(). + flags <- c( + if (has_vnames) "vertex names", + if (isTRUE(id) && !is.na(graph_id_short)) { + paste("from", substr(graph_id_short, 1, 7)) + }, + if (is.null(graph)) "deleted" + ) + + title <- paste0( + " ", + length(x), + "/", + total, + flag_suffix_cli(flags, middot) + ) + cli_section(title, blank = FALSE) + + if (length(x) == 0) { + return(invisible(x)) + } + + # An edge sequence prints in one of two layouts, mirroring vertex sequences: + # + # * detailed -- one row per selected edge with its endpoints and every edge + # attribute as columns (a metadata table); produced by `E(g)[[...]]`. + # * compact -- a list of "tail head" strings; produced by + # `E(g)[...]`. Handled further below. + # + # As with vertex sequences, `[[` and `[` build the same underlying sequence; + # `[[.igraph.es` only tags its result with the "single" attribute that + # is_single_index() reads here. The table needs only that flag and a live + # graph -- unlike the vertex case there is no attribute-count check, because + # an edge always has endpoints to tabulate (the tail/head names plus their + # raw numeric ids in tid/hid), so the table is never empty. + if (is_single_index(x) && !is.null(graph)) { + print_edge_detail(graph, x) + return(invisible(x)) + } + + max_lines <- if (isTRUE(full)) NULL else igraph_opt("auto.print.lines") + + if (!is.null(graph)) { + # Live graph: render endpoints with arrows. + arrow <- edge_arrow_cli(is_directed(graph)) + endpoints <- ends(graph, x, names = has_vnames || is_named(graph)) + body <- format_cli_edge_endpoints(endpoints, arrow) + } else { + # Graph was deleted: fall back to stored vertex names / ids. + body <- if (!is.null(attr(x, "vnames"))) { + as.vector(attr(x, "vnames")) + } else if (!is.null(names(x))) { + names(x) + } else { + as.vector(x) + } + } + print_cli_lines(body, max_lines, "+ ... omitted several edges\n") + invisible(x) +} + # these are internal as_igraph_vs <- function(graph, v, na.ok = FALSE) { diff --git a/R/par.R b/R/par.R index 68b13548f14..b76f25024a4 100644 --- a/R/par.R +++ b/R/par.R @@ -71,7 +71,8 @@ getIgraphOpt <- function(x, default = NULL) { "annotate.plot" = FALSE, "auto.print.lines" = 10, "return.vs.es" = TRUE, - "print.id" = TRUE + "print.id" = TRUE, + "print.style" = "cli" ) igraph.pars.set.verbose <- function(verbose) { @@ -156,6 +157,14 @@ igraph.pars.callbacks <- list("verbose" = igraph.pars.set.verbose) #' \item{print.vertex.attributes}{ #' Logical constant, whether to print vertex attributes when printing graphs. Defaults to `FALSE`. #' } +#' \item{print.style}{ +#' Character string controlling the visual style used by +#' [print.igraph()], [summary.igraph()], [print.igraph.vs()] and +#' [print.igraph.es()]. Possible values are `"cli"` (default, a +#' cli-styled output with section rules, Unicode arrows for edges and +#' typed attribute listings) and `"classic"` (the historical +#' `IGRAPH ... DNW-` header relied on by tutorials and parsers). +#' } #' \item{return.vs.es}{ #' Whether functions that return a set or sequence of vertices/edges #' should return formal vertex/edge sequence objects. diff --git a/R/print.R b/R/print.R index c4aa11b8e8c..0727bfae8c7 100644 --- a/R/print.R +++ b/R/print.R @@ -286,6 +286,32 @@ } } +# Print the "single index" (`[[`) edge detail view: one row per edge with +# tail/head names, their raw numeric ids (tid/hid) and one column per atomic +# edge attribute. If any attribute is list-valued, the frame can't hold it, so +# fall back to a per-attribute named list sliced to the selected edges. +print_edge_detail <- function(graph, edges) { + ea <- edge_attr(graph) + if (all(vapply(ea, is.atomic, logical(1)))) { + etail <- tail_of(graph, edges) + ehead <- head_of(graph, edges) + df <- data.frame( + stringsAsFactors = FALSE, + tail = as_ids(etail), + head = as_ids(ehead), + tid = as.vector(etail), + hid = as.vector(ehead) + ) + if (length(ea)) { + ea <- do_call(data.frame, .args = ea, stringsAsFactors = FALSE) + df <- cbind(df, ea[as.vector(edges), , drop = FALSE]) + } + print(df) + } else { + print(lapply(ea, "[", as.vector(edges))) + } +} + .print.edges.compressed <- function( x, edges = E(x), @@ -316,25 +342,7 @@ if (is_single_index(edges) && !is.null(x)) { ## Double bracket - ea <- edge_attr(x) - if (all(sapply(ea, is.atomic))) { - etail <- tail_of(x, edges) - ehead <- head_of(x, edges) - df <- data.frame( - stringsAsFactors = FALSE, - tail = as_ids(etail), - head = as_ids(ehead), - tid = as.vector(etail), - hid = as.vector(ehead) - ) - if (length(ea)) { - ea <- do_call(data.frame, .args = ea, stringsAsFactors = FALSE) - df <- cbind(df, ea[as.vector(edges), , drop = FALSE]) - } - print(df) - } else { - print(lapply(ea, "[", as.vector(edges))) - } + print_edge_detail(x, edges) } else if (is.null(max.lines)) { .print.edges.compressed.all(x, edges, names) } else { @@ -548,6 +556,12 @@ print_all <- function(object, ...) { #' As of igraph 1.1.1, the `str.igraph` function is defunct, use #' `print_all()`. #' +#' Output style is controlled by the `print.style` igraph option. The default +#' `"cli"` produces cli-styled output with section rules, typed attribute +#' listings and Unicode arrows for edges. Set +#' `igraph_options(print.style = "classic")` for the historical +#' `IGRAPH ... DNW-` header relied on by parsers and tutorials. +#' #' @aliases print.igraph print_all summary.igraph str.igraph #' @param x The graph to print. #' @param full Logical scalar, whether to print the graph structure itself as @@ -589,6 +603,44 @@ print.igraph <- function( ) { ensure_igraph(x) + if (!is_cli_style()) { + return(print_igraph_legacy( + x, + full = full, + graph.attributes = graph.attributes, + vertex.attributes = vertex.attributes, + edge.attributes = edge.attributes, + names = names, + max.lines = max.lines, + id = id, + ... + )) + } + + print_igraph_cli( + x, + full = full, + graph.attributes = graph.attributes, + vertex.attributes = vertex.attributes, + edge.attributes = edge.attributes, + names = names, + max.lines = max.lines, + id = id, + ... + ) +} + +print_igraph_legacy <- function( + x, + full = igraph_opt("print.full"), + graph.attributes = igraph_opt("print.graph.attributes"), + vertex.attributes = igraph_opt("print.vertex.attributes"), + edge.attributes = igraph_opt("print.edge.attributes"), + names = TRUE, + max.lines = igraph_opt("auto.print.lines"), + id = igraph_opt("print.id"), + ... +) { head_lines <- .print.header(x, id) if (is.logical(full) && full) { if (graph.attributes) { @@ -625,10 +677,326 @@ print.igraph <- function( #' @family print #' @export summary.igraph <- function(object, ...) { + if (!is_cli_style()) { + return(summary_igraph_legacy(object)) + } + summary_igraph_cli(object) +} + +summary_igraph_legacy <- function(object, ...) { .print.header(object) invisible(object) } +# cli-styled printing ---------------------------------------------------- + +# igraph_opt() may return NULL; NULL == "cli" breaks if(), so use identical() +is_cli_style <- function() { + identical(igraph_opt("print.style"), "cli") +} + +# Emit a cli section rule. The leading blank line separates this section from +# the previous one; `blank = FALSE` omits it for the first (header) rule. +cli_section <- function(title, right = NULL, blank = TRUE) { + rule <- if (is.null(right)) { + cli::rule(left = title) + } else { + cli::rule(left = title, right = right) + } + cat(if (blank) "\n", rule, "\n", sep = "") +} + +# Print a character vector either in full (`max.lines = NULL`) or truncated to +# `max.lines` with cli's omission footer. +print_cli_lines <- function(x, max.lines, omitted_footer) { + if (is.null(max.lines)) { + print(x, quote = FALSE) + } else { + head_print( + x, + omitted_footer = omitted_footer, + quote = FALSE, + max_lines = max.lines + ) + } +} + +# Format edge endpoints as "tail head " strings. Endpoints are not +# padded to a common width, so each edge reads with a single space around the +# delimiter; the trailing space yields two spaces between edges once print() +# adds its own single-space separator. +format_cli_edge_endpoints <- function(endpoints, arrow) { + paste0(endpoints[, 1], " ", arrow, " ", endpoints[, 2], " ") +} + +# Leading + interleaved middot separators for a vector of flag labels; +# returns "" when there are no flags (avoids an if/else at the call site). +flag_suffix_cli <- function(flags, middot) { + paste(c("", flags), collapse = paste0(" ", middot, " ")) +} + +edge_arrow_cli <- function(directed) { + if (cli::is_utf8_output()) { + if (directed) "\u2192" else "\u2500" + } else { + if (directed) "->" else "--" + } +} + +middot_cli <- function() { + if (cli::is_utf8_output()) "\u00b7" else "*" +} + +# Bare type label for an attribute mode code; the surrounding `<...>` is added +# by cli's `{.cls}` inline class at the call site. +attr_label_cli <- function(code) { + switch( + code, + c = "chr", + n = "dbl", + l = "lgl", + x = "list", + code + ) +} + +attr_codes_cli <- function(x, kind) { + if (kind == "graph") { + .Call(Rx_igraph_get_attr_mode, x, 2L) + } else if (kind == "vertex") { + .Call(Rx_igraph_get_attr_mode, x, 3L) + } else { + .Call(Rx_igraph_get_attr_mode, x, 4L) + } +} + +print_igraph_header_cli <- function(x, id) { + name <- if ("name" %in% graph_attr_names(x)) { + as.character(x$name)[1] + } else { + NULL + } + title <- if (!is.null(name) && !is.na(name) && nzchar(name)) { + paste0(" ", name) + } else { + "" + } + # `id` comes from an option and may be NULL/NA, so guard with isTRUE(). + graph_id_short <- if (isTRUE(id)) substr(graph_id(x), 1, 7) else NA_character_ + + # Show the graph id on the right of the rule only when we have one. + has_id <- !is.na(graph_id_short) && nzchar(graph_id_short) + cli_section(title, right = if (has_id) graph_id_short, blank = FALSE) + + properties <- c( + if (is_directed(x)) "directed" else "undirected", + if (is_named(x)) "named", + if (is_weighted(x)) "weighted", + if (is_bipartite(x)) "bipartite" + ) + + middot <- middot_cli() + sep <- paste0(" ", middot, " ") + info_symbol <- cli::col_cyan(cli::symbol$info) + + cat(info_symbol, " ", paste(properties, collapse = sep), "\n", sep = "") + cat( + info_symbol, + " ", + vcount(x), + " vertices ", + middot, + " ", + ecount(x), + " edges\n", + sep = "" + ) +} + +print_igraph_attr_summary_cli <- function(x) { + graph_attrs <- graph_attr_names(x) + vertex_attrs <- vertex_attr_names(x) + edge_attrs <- edge_attr_names(x) + if ( + length(graph_attrs) == 0 && + length(vertex_attrs) == 0 && + length(edge_attrs) == 0 + ) { + return(invisible(NULL)) + } + + cli_section("Attributes") + arrow <- if (cli::is_utf8_output()) "\u2192" else "->" + + # Style names and type codes via cli's semantic classes (`.field`, `.cls`) + # rather than hand-picked colors, so cli's theme owns the palette and it + # respects NO_COLOR / non-tty output. `.cls` also supplies the `<...>`. + format_line <- function(label, names, codes) { + labels <- vapply(codes, attr_label_cli, character(1)) + parts <- vapply( + seq_along(names), + function(i) { + nm <- names[i] + lbl <- labels[i] + cli::format_inline("{.field {nm}} {.cls {lbl}}") + }, + character(1) + ) + paste0(arrow, " ", label, paste(parts, collapse = ", ")) + } + + lines <- c( + if (length(graph_attrs)) { + format_line("graph: ", graph_attrs, attr_codes_cli(x, "graph")) + }, + if (length(vertex_attrs)) { + format_line("vertex: ", vertex_attrs, attr_codes_cli(x, "vertex")) + }, + if (length(edge_attrs)) { + format_line("edge: ", edge_attrs, attr_codes_cli(x, "edge")) + } + ) + # One newline per line, no trailing blank: each section starts with its own + # leading blank, so emitting one here would double the gap to the next one. + cat(paste0(lines, "\n"), sep = "") +} + +print_igraph_graph_attrs_cli <- function(x) { + attr_names <- graph_attr_names(x) + if (length(attr_names) == 0) { + return(invisible(NULL)) + } + cli_section("Graph attributes") + for (attr_name in attr_names) { + cat(cli::format_inline("{.field {attr_name}}:"), "\n", sep = "") + indent_print(graph_attr(x, attr_name), .indent = " ") + } +} + +print_igraph_vertex_attrs_cli <- function(x) { + if (length(vertex_attr_names(x)) == 0) { + return(invisible(NULL)) + } + cli_section("Vertex attributes") + # reuse classic tabular renderer + .print.vertex.attributes.old(x, full = TRUE, max.lines = NULL) +} + +print_igraph_edges_cli <- function( + x, + edges = E(x), + names = TRUE, + max.lines = NULL, + with_attrs = FALSE +) { + is_named_g <- isTRUE(names) && is_named(x) + if ( + is_named_g && + "name" %in% vertex_attr_names(x) && + !is.numeric(vertex_attr(x, "name")) && + !is.character(vertex_attr(x, "name")) && + !is.logical(vertex_attr(x, "name")) + ) { + cli::cli_warn( + "Can't print vertex names, complex {.val name} vertex attribute." + ) + is_named_g <- FALSE + } + + n_edges <- length(edges) + if (n_edges == 0) { + return(invisible(NULL)) + } + + title_suffix <- if (is_named_g) " (vertex names)" else "" + show_attrs <- with_attrs && length(edge_attr_names(x)) != 0 + title <- if (show_attrs) { + paste0("Edges with attributes", title_suffix) + } else { + paste0("Edges", title_suffix) + } + cli_section(title) + + arrow <- edge_arrow_cli(is_directed(x)) + endpoints <- ends(x, edges, names = is_named_g) + + if (show_attrs) { + # Tabular layout: one row per edge, endpoints in an "edge" column + # followed by one column per (non-name) edge attribute. + other_attrs <- setdiff(edge_attr_names(x), "name") + width <- if (is.numeric(endpoints)) { + nchar(max(endpoints)) + } else { + max(nchar(endpoints)) + } + edge_names <- if ("name" %in% edge_attr_names(x)) { + paste0("'", edge_attr(x, "name"), "'") + } else { + seq_len(nrow(endpoints)) + } + tab <- data.frame(row.names = paste0("[", edge_names, "]")) + tab[["edge"]] <- paste0( + format(endpoints[, 1], width = width), + " ", + arrow, + " ", + format(endpoints[, 2], width = width) + ) + for (attr_name in other_attrs) { + tab[[attr_name]] <- edge_attr(x, attr_name) + } + print(tab) + } else { + formatted <- format_cli_edge_endpoints(endpoints, arrow) + print_cli_lines(formatted, max.lines, "+ ... omitted several edges\n") + } +} + +print_igraph_cli <- function( + x, + full = igraph_opt("print.full"), + graph.attributes = igraph_opt("print.graph.attributes"), + vertex.attributes = igraph_opt("print.vertex.attributes"), + edge.attributes = igraph_opt("print.edge.attributes"), + names = TRUE, + max.lines = igraph_opt("auto.print.lines"), + id = igraph_opt("print.id"), + ... +) { + print_igraph_header_cli(x, id) + print_igraph_attr_summary_cli(x) + + if (isTRUE(full)) { + if (graph.attributes) { + print_igraph_graph_attrs_cli(x) + } + if (vertex.attributes) { + print_igraph_vertex_attrs_cli(x) + } + if (ecount(x) > 0) { + if (edge.attributes && length(edge_attr_names(x)) != 0) { + print_igraph_edges_cli( + x, + names = names, + max.lines = NULL, + with_attrs = TRUE + ) + } else { + print_igraph_edges_cli(x, names = names, max.lines = NULL) + } + } + } else if (identical(full, "auto")) { + print_igraph_edges_cli(x, names = names, max.lines = max.lines) + } + invisible(x) +} + +summary_igraph_cli <- function(object) { + print_igraph_header_cli(object, id = igraph_opt("print.id")) + print_igraph_attr_summary_cli(object) + invisible(object) +} + " #################################################################### ## Various designs for printing graphs diff --git a/man/print.igraph.Rd b/man/print.igraph.Rd index 286ef6bd9a0..9b3c821a4ea 100644 --- a/man/print.igraph.Rd +++ b/man/print.igraph.Rd @@ -100,6 +100,11 @@ As of igraph 0.4 \code{print_all()} and \code{print.igraph()} use the As of igraph 1.1.1, the \code{str.igraph} function is defunct, use \code{print_all()}. + +Set \code{igraph_options(print.style = "cli")} to switch to a cli-styled +output with section rules, typed attribute listings and Unicode arrows +for edges. The default \code{"classic"} keeps the historical +\verb{IGRAPH ... DNW-} header relied on by parsers and tutorials. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_degree}{\code{degree()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_is_directed}{\code{is_directed()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}} diff --git a/man/print.igraph.es.Rd b/man/print.igraph.es.Rd index 4b481b4147a..b5d2dbe95f1 100644 --- a/man/print.igraph.es.Rd +++ b/man/print.igraph.es.Rd @@ -30,7 +30,7 @@ differently, together with all attributes of the edges in the sequence, as a table. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_is_directed}{\code{is_directed()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_is_directed}{\code{is_directed()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} } \examples{ diff --git a/tests/testthat/_snaps/flow.md b/tests/testthat/_snaps/flow.md index 61e2886e0f3..e7fa818e87b 100644 --- a/tests/testthat/_snaps/flow.md +++ b/tests/testthat/_snaps/flow.md @@ -102,15 +102,15 @@ min_st_separators(g_note) Output [[1]] - + 1/5 vertex, named, from something + + 1/5 vertex, named: [1] 1 [[2]] - + 2/5 vertices, named, from something + + 2/5 vertices, named: [1] 2 4 [[3]] - + 2/5 vertices, named, from something + + 2/5 vertices, named: [1] 1 3 diff --git a/tests/testthat/_snaps/print.md b/tests/testthat/_snaps/print-classic.md similarity index 100% rename from tests/testthat/_snaps/print.md rename to tests/testthat/_snaps/print-classic.md diff --git a/tests/testthat/_snaps/print-cli.md b/tests/testthat/_snaps/print-cli.md new file mode 100644 index 00000000000..3e32563bb99 --- /dev/null +++ b/tests/testthat/_snaps/print-cli.md @@ -0,0 +1,227 @@ +# cli print.igraph: undirected unnamed ring + + Code + print(g) + Output + ── Ring graph ───────────────────────────────────────────────────────── + ℹ undirected + ℹ 5 vertices · 5 edges + + ── Attributes ────────────────────────────────────────────────────────────────── + → graph: name , mutual , circular + + ── Edges ─────────────────────────────────────────────────────────────────────── + [1] 1 ─ 2 2 ─ 3 3 ─ 4 4 ─ 5 1 ─ 5 + +--- + + Code + summary(g) + Output + ── Ring graph ───────────────────────────────────────────────────────── + ℹ undirected + ℹ 5 vertices · 5 edges + + ── Attributes ────────────────────────────────────────────────────────────────── + → graph: name , mutual , circular + +# cli print.igraph: directed named weighted + + Code + print(g) + Output + ── trio ─────────────────────────────────────────────────────────────── + ℹ directed · named · weighted + ℹ 3 vertices · 3 edges + + ── Attributes ────────────────────────────────────────────────────────────────── + → graph: name , mutual , circular + → vertex: name + → edge: weight + + ── Edges (vertex names) ──────────────────────────────────────────────────────── + [1] A → B B → C C → A + +--- + + Code + summary(g) + Output + ── trio ─────────────────────────────────────────────────────────────── + ℹ directed · named · weighted + ℹ 3 vertices · 3 edges + + ── Attributes ────────────────────────────────────────────────────────────────── + → graph: name , mutual , circular + → vertex: name + → edge: weight + +# cli print.igraph: bipartite + + Code + print(g) + Output + ── ──────────────────────────────────────────────────────────────────── + ℹ undirected · bipartite + ℹ 4 vertices · 2 edges + + ── Attributes ────────────────────────────────────────────────────────────────── + → vertex: type + + ── Edges ─────────────────────────────────────────────────────────────────────── + [1] 1 ─ 3 2 ─ 4 + +# cli print.igraph: empty graph has no edges section + + Code + print(make_empty_graph(0)) + Output + ── ──────────────────────────────────────────────────────────────────── + ℹ directed + ℹ 0 vertices · 0 edges + +--- + + Code + print(make_empty_graph(3, directed = FALSE)) + Output + ── ──────────────────────────────────────────────────────────────────── + ℹ undirected + ℹ 3 vertices · 0 edges + +# cli print.igraph: full mode with all attribute sections + + Code + print(g) + Output + ── trio ─────────────────────────────────────────────────────────────── + ℹ directed · named · weighted + ℹ 3 vertices · 3 edges + + ── Attributes ────────────────────────────────────────────────────────────────── + → graph: name , mutual , circular + → vertex: name + → edge: weight + + ── Graph attributes ──────────────────────────────────────────────────────────── + name: + [1] "trio" + mutual: + [1] FALSE + circular: + [1] TRUE + + ── Vertex attributes ─────────────────────────────────────────────────────────── + name + [1] A + [2] B + [3] C + + ── Edges with attributes (vertex names) ──────────────────────────────────────── + edge weight + [1] A → B 1 + [2] B → C 2 + [3] C → A 3 + +# cli print.igraph.vs: single and double bracket + + Code + V(g) + Output + ── 3/3 · named ─────────────────────────────────────────────── + [1] A B C + Code + V(g)[1:2] + Output + ── 2/3 · named ─────────────────────────────────────────────── + [1] A B + Code + V(g)[[1]] + Output + ── 1/3 · named ─────────────────────────────────────────────── + name weight + 1 A 10 + Code + V(g)[[2:3]] + Output + ── 2/3 · named ─────────────────────────────────────────────── + name weight + 2 B 11 + 3 C 12 + +# cli print.igraph.es: single and double bracket + + Code + E(g) + Output + ── 3/3 · vertex names ────────────────────────────────────────── + [1] A → B B → C C → A + Code + E(g)[1:2] + Output + ── 2/3 · vertex names ────────────────────────────────────────── + [1] A → B B → C + Code + E(g)[[1]] + Output + ── 1/3 · vertex names ────────────────────────────────────────── + tail head tid hid weight + 1 A B 1 2 1 + Code + E(g)[[2:3]] + Output + ── 2/3 · vertex names ────────────────────────────────────────── + tail head tid hid weight + 2 B C 2 3 2 + 3 C A 3 1 3 + +# cli print.igraph: ASCII fallback when cli.unicode = FALSE + + Code + print(g) + Output + -- Ring graph --------------------------------------------------------- + i directed * named + i 3 vertices * 3 edges + + -- Attributes ------------------------------------------------------------------ + -> graph: name , mutual , circular + -> vertex: name + + -- Edges (vertex names) -------------------------------------------------------- + [1] A -> B B -> C C -> A + +--- + + Code + V(g) + Output + -- 3/3 * named ----------------------------------------------- + [1] A B C + +--- + + Code + E(g) + Output + -- 3/3 * vertex names ------------------------------------------ + [1] A -> B B -> C C -> A + +# cli print.igraph: truncation in auto mode + + Code + print(g) + Output + ── Ring graph ───────────────────────────────────────────────────────── + ℹ undirected + ℹ 200 vertices · 200 edges + + ── Attributes ────────────────────────────────────────────────────────────────── + → graph: name , mutual , circular + + ── Edges ─────────────────────────────────────────────────────────────────────── + [1] 1 ─ 2 2 ─ 3 3 ─ 4 4 ─ 5 5 ─ 6 6 ─ 7 + [7] 7 ─ 8 8 ─ 9 9 ─ 10 10 ─ 11 11 ─ 12 12 ─ 13 + [13] 13 ─ 14 14 ─ 15 15 ─ 16 16 ─ 17 17 ─ 18 18 ─ 19 + + ... omitted several edges + diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R new file mode 100644 index 00000000000..dff9e0adf9e --- /dev/null +++ b/tests/testthat/setup.R @@ -0,0 +1,6 @@ +# Pin print options for the whole test suite so output is deterministic and +# independent of the package defaults. `print.style = "classic"` keeps the +# historical `IGRAPH ... DNW-` output that most snapshots assert against; the +# cli-styled output is exercised explicitly in test-print-cli.R. `print.id` +# is pinned off because the 7-character graph id is non-deterministic. +igraph_options(print.style = "classic", print.id = FALSE) diff --git a/tests/testthat/test-aaa-auto.R b/tests/testthat/test-aaa-auto.R index bcd8fd14fff..11554ed7304 100644 --- a/tests/testthat/test-aaa-auto.R +++ b/tests/testthat/test-aaa-auto.R @@ -13,7 +13,6 @@ skip_on_cran() # 1. empty_impl test_that("empty_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(empty_impl()) expect_snapshot(empty_impl( @@ -40,7 +39,6 @@ test_that("empty_impl basic", { test_that("empty_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(empty_impl( n = -1 )) @@ -50,7 +48,6 @@ test_that("empty_impl errors", { test_that("add_edges_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- empty_impl( n = 3 ) @@ -72,7 +69,6 @@ test_that("add_edges_impl basic", { test_that("add_edges_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(add_edges_impl( graph = NULL, edges = c(1, 2) @@ -83,7 +79,6 @@ test_that("add_edges_impl errors", { test_that("copy_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- empty_impl( n = 2 ) @@ -104,7 +99,6 @@ test_that("copy_impl basic", { test_that("copy_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(copy_impl( from = NULL )) @@ -114,7 +108,6 @@ test_that("copy_impl errors", { test_that("delete_vertices_idx_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- empty_impl( n = 3 ) @@ -137,7 +130,6 @@ test_that("delete_vertices_idx_impl basic", { test_that("delete_vertices_idx_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(delete_vertices_idx_impl( graph = NULL, vertices = 1 @@ -148,7 +140,6 @@ test_that("delete_vertices_idx_impl errors", { test_that("vcount_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- empty_impl( n = 4 ) @@ -168,7 +159,6 @@ test_that("vcount_impl basic", { test_that("vcount_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(vcount_impl( graph = NULL )) @@ -178,7 +168,6 @@ test_that("vcount_impl errors", { test_that("degree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- empty_impl( n = 3 ) @@ -202,7 +191,6 @@ test_that("degree_impl basic", { test_that("degree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(degree_impl( graph = NULL )) @@ -212,7 +200,6 @@ test_that("degree_impl errors", { test_that("get_all_eids_between_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- empty_impl( n = 2 ) @@ -234,7 +221,6 @@ test_that("get_all_eids_between_impl basic", { test_that("get_all_eids_between_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_all_eids_between_impl( graph = NULL, from = 1, @@ -246,7 +232,6 @@ test_that("get_all_eids_between_impl errors", { test_that("wheel_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(wheel_impl( n = 5 )) @@ -265,7 +250,6 @@ test_that("wheel_impl basic", { test_that("wheel_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(wheel_impl( n = -1 )) @@ -275,7 +259,6 @@ test_that("wheel_impl errors", { test_that("hypercube_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(hypercube_impl( n = 3 )) @@ -293,7 +276,6 @@ test_that("hypercube_impl basic", { test_that("hypercube_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(hypercube_impl( n = 10000 )) @@ -303,7 +285,6 @@ test_that("hypercube_impl errors", { test_that("square_lattice_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(square_lattice_impl( dimvector = c(2, 2) )) @@ -324,7 +305,6 @@ test_that("square_lattice_impl basic", { test_that("square_lattice_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(square_lattice_impl( dimvector = -1 )) @@ -334,7 +314,6 @@ test_that("square_lattice_impl errors", { test_that("triangular_lattice_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(triangular_lattice_impl( dimvector = c(2, 2) )) @@ -353,7 +332,6 @@ test_that("triangular_lattice_impl basic", { test_that("triangular_lattice_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(triangular_lattice_impl( dimvector = -1 )) @@ -363,7 +341,6 @@ test_that("triangular_lattice_impl errors", { test_that("path_graph_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(path_graph_impl( n = 5 )) @@ -382,7 +359,6 @@ test_that("path_graph_impl basic", { test_that("path_graph_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(path_graph_impl( n = -1 )) @@ -392,7 +368,6 @@ test_that("path_graph_impl errors", { test_that("cycle_graph_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(cycle_graph_impl( n = 5 )) @@ -411,7 +386,6 @@ test_that("cycle_graph_impl basic", { test_that("cycle_graph_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(cycle_graph_impl( n = -1 )) @@ -421,7 +395,6 @@ test_that("cycle_graph_impl errors", { test_that("symmetric_tree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(symmetric_tree_impl( branches = 3 )) @@ -439,7 +412,6 @@ test_that("symmetric_tree_impl basic", { test_that("symmetric_tree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(symmetric_tree_impl( branches = -1 )) @@ -449,7 +421,6 @@ test_that("symmetric_tree_impl errors", { test_that("regular_tree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(regular_tree_impl( h = 2 )) @@ -468,7 +439,6 @@ test_that("regular_tree_impl basic", { test_that("regular_tree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(regular_tree_impl( h = -1 )) @@ -478,7 +448,6 @@ test_that("regular_tree_impl errors", { test_that("full_citation_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(full_citation_impl( n = 5 )) @@ -496,7 +465,6 @@ test_that("full_citation_impl basic", { test_that("full_citation_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(full_citation_impl( n = -1 )) @@ -506,7 +474,6 @@ test_that("full_citation_impl errors", { test_that("atlas_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(atlas_impl( number = 0 )) @@ -523,7 +490,6 @@ test_that("atlas_impl basic", { test_that("atlas_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(atlas_impl( number = -1 )) @@ -533,7 +499,6 @@ test_that("atlas_impl errors", { test_that("extended_chordal_ring_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(extended_chordal_ring_impl( nodes = 5, W = matrix(c(1, 2)) @@ -554,7 +519,6 @@ test_that("extended_chordal_ring_impl basic", { test_that("extended_chordal_ring_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(extended_chordal_ring_impl( nodes = -1, W = matrix(c(1, 2)) @@ -565,7 +529,6 @@ test_that("extended_chordal_ring_impl errors", { test_that("graph_power_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 5 ) @@ -590,7 +553,6 @@ test_that("graph_power_impl basic", { test_that("graph_power_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(graph_power_impl( graph = NULL, order = 2 @@ -601,7 +563,6 @@ test_that("graph_power_impl errors", { test_that("linegraph_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 5 ) @@ -619,7 +580,6 @@ test_that("linegraph_impl basic", { test_that("linegraph_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(linegraph_impl( graph = NULL )) @@ -628,7 +588,6 @@ test_that("linegraph_impl errors", { # 21. de_bruijn_impl test_that("de_bruijn_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(de_bruijn_impl( m = 2, n = 3 @@ -643,7 +602,6 @@ test_that("de_bruijn_impl basic", { }) test_that("de_bruijn_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(de_bruijn_impl( m = -1, n = 3 @@ -653,7 +611,6 @@ test_that("de_bruijn_impl errors", { # 22. kautz_impl test_that("kautz_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(kautz_impl( m = 2, n = 3 @@ -668,7 +625,6 @@ test_that("kautz_impl basic", { }) test_that("kautz_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(kautz_impl( m = -1, n = 3 @@ -678,7 +634,6 @@ test_that("kautz_impl errors", { # 23. lcf_vector_impl test_that("lcf_vector_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(lcf_vector_impl( n = 10, shifts = c(3, -3, 4), @@ -695,7 +650,6 @@ test_that("lcf_vector_impl basic", { }) test_that("lcf_vector_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(lcf_vector_impl( n = -1, shifts = c(3, -3, 4), @@ -706,7 +660,6 @@ test_that("lcf_vector_impl errors", { # 24. mycielski_graph_impl test_that("mycielski_graph_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(mycielski_graph_impl( k = 3 )) @@ -719,7 +672,6 @@ test_that("mycielski_graph_impl basic", { }) test_that("mycielski_graph_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(mycielski_graph_impl( k = -1 )) @@ -729,7 +681,6 @@ test_that("mycielski_graph_impl errors", { test_that("adjlist_impl basic", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(adjlist_impl( adjlist = list(c(2, 3), c(1), c(1)), mode = "out" @@ -745,7 +696,6 @@ test_that("adjlist_impl basic", { test_that("adjlist_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(adjlist_impl( adjlist = -1, mode = "out" @@ -755,7 +705,6 @@ test_that("adjlist_impl errors", { # 26. full_bipartite_impl test_that("full_bipartite_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(full_bipartite_impl( n1 = 2, n2 = 3 @@ -776,7 +725,6 @@ test_that("full_bipartite_impl basic", { }) test_that("full_bipartite_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(full_bipartite_impl( n1 = -1, n2 = 3 @@ -786,7 +734,6 @@ test_that("full_bipartite_impl errors", { # 27. full_multipartite_impl test_that("full_multipartite_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(full_multipartite_impl( n = c(2, 3, 4) )) @@ -804,7 +751,6 @@ test_that("full_multipartite_impl basic", { }) test_that("full_multipartite_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(full_multipartite_impl( n = -1 )) @@ -813,7 +759,6 @@ test_that("full_multipartite_impl errors", { # 28. realize_degree_sequence_impl test_that("realize_degree_sequence_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(realize_degree_sequence_impl( out_deg = c(2, 2, 2) )) @@ -832,7 +777,6 @@ test_that("realize_degree_sequence_impl basic", { }) test_that("realize_degree_sequence_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(realize_degree_sequence_impl( out_deg = -1 )) @@ -841,7 +785,6 @@ test_that("realize_degree_sequence_impl errors", { # 29. realize_bipartite_degree_sequence_impl test_that("realize_bipartite_degree_sequence_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(realize_bipartite_degree_sequence_impl( degrees1 = c(2, 2), degrees2 = c(2, 2) @@ -862,7 +805,6 @@ test_that("realize_bipartite_degree_sequence_impl basic", { }) test_that("realize_bipartite_degree_sequence_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( realize_bipartite_degree_sequence_impl( degrees1 = -1, @@ -874,7 +816,6 @@ test_that("realize_bipartite_degree_sequence_impl errors", { # 30. circulant_impl test_that("circulant_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(circulant_impl( n = 5, shifts = c(1, 2) @@ -894,7 +835,6 @@ test_that("circulant_impl basic", { }) test_that("circulant_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(circulant_impl( n = -1, shifts = c(1, 2) @@ -904,7 +844,6 @@ test_that("circulant_impl errors", { # 31. generalized_petersen_impl test_that("generalized_petersen_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(generalized_petersen_impl( n = 5, k = 2 @@ -919,7 +858,6 @@ test_that("generalized_petersen_impl basic", { }) test_that("generalized_petersen_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(generalized_petersen_impl( n = -1, k = 2 @@ -929,7 +867,6 @@ test_that("generalized_petersen_impl errors", { # 32. turan_impl test_that("turan_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(turan_impl( n = 5, r = 2 @@ -944,7 +881,6 @@ test_that("turan_impl basic", { }) test_that("turan_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(turan_impl( n = -1, r = 2 @@ -954,7 +890,6 @@ test_that("turan_impl errors", { # 33. erdos_renyi_game_gnp_impl test_that("erdos_renyi_game_gnp_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(erdos_renyi_game_gnp_impl( n = 5, p = 0.5 @@ -975,7 +910,6 @@ test_that("erdos_renyi_game_gnp_impl basic", { }) test_that("erdos_renyi_game_gnp_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(erdos_renyi_game_gnp_impl( n = -1, p = 0.5 @@ -985,7 +919,6 @@ test_that("erdos_renyi_game_gnp_impl errors", { # 34. erdos_renyi_game_gnm_impl test_that("erdos_renyi_game_gnm_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(erdos_renyi_game_gnm_impl( n = 5, m = 3 @@ -1006,7 +939,6 @@ test_that("erdos_renyi_game_gnm_impl basic", { }) test_that("erdos_renyi_game_gnm_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(erdos_renyi_game_gnm_impl( n = -1, m = 3 @@ -1016,7 +948,6 @@ test_that("erdos_renyi_game_gnm_impl errors", { # 35. growing_random_game_impl test_that("growing_random_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(growing_random_game_impl( n = 5, m = 2 @@ -1037,7 +968,6 @@ test_that("growing_random_game_impl basic", { }) test_that("growing_random_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(growing_random_game_impl( n = -1, m = 2 @@ -1047,7 +977,6 @@ test_that("growing_random_game_impl errors", { # 36. preference_game_impl test_that("preference_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(preference_game_impl( nodes = 5, types = 2, @@ -1068,7 +997,6 @@ test_that("preference_game_impl basic", { }) test_that("preference_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( preference_game_impl( nodes = -1, @@ -1083,7 +1011,6 @@ test_that("preference_game_impl errors", { # 37. asymmetric_preference_game_impl test_that("asymmetric_preference_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(asymmetric_preference_game_impl( nodes = 5, out_types = 2, @@ -1104,7 +1031,6 @@ test_that("asymmetric_preference_game_impl basic", { }) test_that("asymmetric_preference_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( asymmetric_preference_game_impl( nodes = -1, @@ -1119,7 +1045,6 @@ test_that("asymmetric_preference_game_impl errors", { # 38. rewire_edges_impl test_that("rewire_edges_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 5 ) @@ -1138,7 +1063,6 @@ test_that("rewire_edges_impl basic", { }) test_that("rewire_edges_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(rewire_edges_impl( graph = NULL, prob = 0.5 @@ -1148,7 +1072,6 @@ test_that("rewire_edges_impl errors", { # 39. rewire_directed_edges_impl test_that("rewire_directed_edges_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 5, directed = TRUE @@ -1168,7 +1091,6 @@ test_that("rewire_directed_edges_impl basic", { }) test_that("rewire_directed_edges_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(rewire_directed_edges_impl( graph = NULL, prob = 0.5 @@ -1178,7 +1100,6 @@ test_that("rewire_directed_edges_impl errors", { # 40. forest_fire_game_impl test_that("forest_fire_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(forest_fire_game_impl( nodes = 5, fw_prob = 0.5 @@ -1200,7 +1121,6 @@ test_that("forest_fire_game_impl basic", { }) test_that("forest_fire_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(forest_fire_game_impl( nodes = -1, fw_prob = 0.5 @@ -1210,7 +1130,6 @@ test_that("forest_fire_game_impl errors", { # 41. simple_interconnected_islands_game_impl test_that("simple_interconnected_islands_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(simple_interconnected_islands_game_impl( islands_n = 2, islands_size = 3, @@ -1229,7 +1148,6 @@ test_that("simple_interconnected_islands_game_impl basic", { }) test_that("simple_interconnected_islands_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( simple_interconnected_islands_game_impl( islands_n = -1, @@ -1243,7 +1161,6 @@ test_that("simple_interconnected_islands_game_impl errors", { # 42. chung_lu_game_impl test_that("chung_lu_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(chung_lu_game_impl( out_weights = c(2, 2, 2) )) @@ -1262,7 +1179,6 @@ test_that("chung_lu_game_impl basic", { }) test_that("chung_lu_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(chung_lu_game_impl( out_weights = -1 )) @@ -1271,7 +1187,6 @@ test_that("chung_lu_game_impl errors", { # 43. static_fitness_game_impl test_that("static_fitness_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(static_fitness_game_impl( no_of_edges = 3, fitness_out = c(1, 2, 3) @@ -1293,7 +1208,6 @@ test_that("static_fitness_game_impl basic", { }) test_that("static_fitness_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(static_fitness_game_impl( no_of_edges = -1, fitness_out = c(1, 2, 3) @@ -1303,7 +1217,6 @@ test_that("static_fitness_game_impl errors", { # 44. static_power_law_game_impl test_that("static_power_law_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(static_power_law_game_impl( no_of_nodes = 5, no_of_edges = 4, @@ -1329,7 +1242,6 @@ test_that("static_power_law_game_impl basic", { }) test_that("static_power_law_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(static_power_law_game_impl( no_of_nodes = -1, no_of_edges = 4, @@ -1341,7 +1253,6 @@ test_that("static_power_law_game_impl errors", { test_that("k_regular_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(k_regular_game_impl( no_of_nodes = 5, k = 2 @@ -1363,7 +1274,6 @@ test_that("k_regular_game_impl basic", { test_that("k_regular_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(k_regular_game_impl( no_of_nodes = -1, k = 2 @@ -1374,7 +1284,6 @@ test_that("k_regular_game_impl errors", { test_that("sbm_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(sbm_game_impl( n = 5, pref_matrix = matrix(0.5, 2, 2), @@ -1399,7 +1308,6 @@ test_that("sbm_game_impl basic", { test_that("sbm_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(sbm_game_impl( n = -1, pref_matrix = matrix(0.5, 2, 2), @@ -1411,7 +1319,6 @@ test_that("sbm_game_impl errors", { test_that("hsbm_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(hsbm_game_impl( n = 6, m = 2, @@ -1433,7 +1340,6 @@ test_that("hsbm_game_impl basic", { test_that("hsbm_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( hsbm_game_impl( n = -1, @@ -1449,7 +1355,6 @@ test_that("hsbm_game_impl errors", { test_that("hsbm_list_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) C <- matrix( c( 1, @@ -1485,7 +1390,6 @@ test_that("hsbm_list_game_impl basic", { test_that("hsbm_list_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( hsbm_list_game_impl( n = -1, @@ -1501,7 +1405,6 @@ test_that("hsbm_list_game_impl errors", { test_that("correlated_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 5 ) @@ -1521,7 +1424,6 @@ test_that("correlated_game_impl basic", { test_that("correlated_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(correlated_game_impl( old_graph = NULL, corr = 0.5 @@ -1532,7 +1434,6 @@ test_that("correlated_game_impl errors", { test_that("correlated_pair_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(correlated_pair_game_impl( n = 5, corr = 0.5, @@ -1556,7 +1457,6 @@ test_that("correlated_pair_game_impl basic", { test_that("correlated_pair_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(correlated_pair_game_impl( n = -1, corr = 0.5, @@ -1568,7 +1468,6 @@ test_that("correlated_pair_game_impl errors", { test_that("dot_product_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(dot_product_game_impl( vecs = matrix(0.5, 5, 2) )) @@ -1586,7 +1485,6 @@ test_that("dot_product_game_impl basic", { test_that("dot_product_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(dot_product_game_impl( vecs = NULL )) @@ -1596,7 +1494,6 @@ test_that("dot_product_game_impl errors", { test_that("sample_sphere_surface_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(sample_sphere_surface_impl( dim = 3, n = 5 @@ -1618,7 +1515,6 @@ test_that("sample_sphere_surface_impl basic", { test_that("sample_sphere_surface_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(sample_sphere_surface_impl( dim = -1, n = 5 @@ -1629,7 +1525,6 @@ test_that("sample_sphere_surface_impl errors", { test_that("sample_sphere_volume_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(sample_sphere_volume_impl( dim = 3, n = 5 @@ -1651,7 +1546,6 @@ test_that("sample_sphere_volume_impl basic", { test_that("sample_sphere_volume_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(sample_sphere_volume_impl( dim = -1, n = 5 @@ -1662,7 +1556,6 @@ test_that("sample_sphere_volume_impl errors", { test_that("sample_dirichlet_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(sample_dirichlet_impl( n = 5, alpha = c(1, 1, 1) @@ -1678,7 +1571,6 @@ test_that("sample_dirichlet_impl basic", { test_that("sample_dirichlet_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(sample_dirichlet_impl( n = -1, alpha = c(1, 1, 1) @@ -1689,7 +1581,6 @@ test_that("sample_dirichlet_impl errors", { test_that("are_adjacent_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -1711,7 +1602,6 @@ test_that("are_adjacent_impl basic", { test_that("are_adjacent_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(are_adjacent_impl( graph = NULL, v1 = 1, @@ -1723,7 +1613,6 @@ test_that("are_adjacent_impl errors", { test_that("closeness_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -1746,7 +1635,6 @@ test_that("closeness_impl basic", { test_that("closeness_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(closeness_impl( graph = NULL )) @@ -1756,7 +1644,6 @@ test_that("closeness_impl errors", { test_that("closeness_cutoff_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -1782,7 +1669,6 @@ test_that("closeness_cutoff_impl basic", { test_that("closeness_cutoff_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(closeness_cutoff_impl( graph = NULL )) @@ -1792,7 +1678,6 @@ test_that("closeness_cutoff_impl errors", { test_that("get_shortest_path_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -1814,7 +1699,6 @@ test_that("get_shortest_path_impl basic", { test_that("get_shortest_path_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_shortest_path_impl( graph = NULL, from = 1, @@ -1826,7 +1710,6 @@ test_that("get_shortest_path_impl errors", { test_that("get_shortest_path_bellman_ford_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -1848,7 +1731,6 @@ test_that("get_shortest_path_bellman_ford_impl basic", { test_that("get_shortest_path_bellman_ford_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_shortest_path_bellman_ford_impl( graph = NULL, from = 1, @@ -1860,7 +1742,6 @@ test_that("get_shortest_path_bellman_ford_impl errors", { test_that("get_shortest_path_dijkstra_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -1882,7 +1763,6 @@ test_that("get_shortest_path_dijkstra_impl basic", { test_that("get_shortest_path_dijkstra_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_shortest_path_dijkstra_impl( graph = NULL, from = 1, @@ -1894,7 +1774,6 @@ test_that("get_shortest_path_dijkstra_impl errors", { test_that("get_all_shortest_paths_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -1916,7 +1795,6 @@ test_that("get_all_shortest_paths_impl basic", { test_that("get_all_shortest_paths_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_all_shortest_paths_impl( graph = NULL, from = 1, @@ -1928,7 +1806,6 @@ test_that("get_all_shortest_paths_impl errors", { test_that("get_all_shortest_paths_dijkstra_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -1950,7 +1827,6 @@ test_that("get_all_shortest_paths_dijkstra_impl basic", { test_that("get_all_shortest_paths_dijkstra_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( get_all_shortest_paths_dijkstra_impl( graph = NULL, @@ -1964,7 +1840,6 @@ test_that("get_all_shortest_paths_dijkstra_impl errors", { test_that("voronoi_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -1990,7 +1865,6 @@ test_that("voronoi_impl basic", { test_that("voronoi_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(voronoi_impl( graph = NULL, generators = 1 @@ -2001,7 +1875,6 @@ test_that("voronoi_impl errors", { test_that("get_all_simple_paths_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2023,7 +1896,6 @@ test_that("get_all_simple_paths_impl basic", { test_that("get_all_simple_paths_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_all_simple_paths_impl( graph = NULL, from = 1, @@ -2035,7 +1907,6 @@ test_that("get_all_simple_paths_impl errors", { test_that("get_k_shortest_paths_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2059,7 +1930,6 @@ test_that("get_k_shortest_paths_impl basic", { test_that("get_k_shortest_paths_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_k_shortest_paths_impl( graph = NULL, from = 1, @@ -2072,7 +1942,6 @@ test_that("get_k_shortest_paths_impl errors", { test_that("get_widest_path_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2096,7 +1965,6 @@ test_that("get_widest_path_impl basic", { test_that("get_widest_path_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_widest_path_impl( graph = NULL, from = 1, @@ -2108,7 +1976,6 @@ test_that("get_widest_path_impl errors", { test_that("get_widest_paths_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2132,7 +1999,6 @@ test_that("get_widest_paths_impl basic", { test_that("get_widest_paths_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_widest_paths_impl( graph = NULL, from = 1, @@ -2144,7 +2010,6 @@ test_that("get_widest_paths_impl errors", { test_that("spanner_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2164,7 +2029,6 @@ test_that("spanner_impl basic", { test_that("spanner_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(spanner_impl( graph = NULL, stretch = 2 @@ -2175,7 +2039,6 @@ test_that("spanner_impl errors", { test_that("betweenness_cutoff_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2195,7 +2058,6 @@ test_that("betweenness_cutoff_impl basic", { test_that("betweenness_cutoff_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(betweenness_cutoff_impl( graph = NULL, cutoff = 2 @@ -2206,7 +2068,6 @@ test_that("betweenness_cutoff_impl errors", { test_that("betweenness_subset_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2224,7 +2085,6 @@ test_that("betweenness_subset_impl basic", { test_that("betweenness_subset_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(betweenness_subset_impl( graph = NULL )) @@ -2234,7 +2094,6 @@ test_that("betweenness_subset_impl errors", { test_that("edge_betweenness_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2252,7 +2111,6 @@ test_that("edge_betweenness_impl basic", { test_that("edge_betweenness_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(edge_betweenness_impl( graph = NULL )) @@ -2262,7 +2120,6 @@ test_that("edge_betweenness_impl errors", { test_that("edge_betweenness_cutoff_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2282,7 +2139,6 @@ test_that("edge_betweenness_cutoff_impl basic", { test_that("edge_betweenness_cutoff_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(edge_betweenness_cutoff_impl( graph = NULL, cutoff = 2 @@ -2293,7 +2149,6 @@ test_that("edge_betweenness_cutoff_impl errors", { test_that("edge_betweenness_subset_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2311,7 +2166,6 @@ test_that("edge_betweenness_subset_impl basic", { test_that("edge_betweenness_subset_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(edge_betweenness_subset_impl( graph = NULL )) @@ -2321,7 +2175,6 @@ test_that("edge_betweenness_subset_impl errors", { test_that("harmonic_centrality_cutoff_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2341,7 +2194,6 @@ test_that("harmonic_centrality_cutoff_impl basic", { test_that("harmonic_centrality_cutoff_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( harmonic_centrality_cutoff_impl( graph = NULL, @@ -2354,7 +2206,6 @@ test_that("harmonic_centrality_cutoff_impl errors", { test_that("personalized_pagerank_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2377,7 +2228,6 @@ test_that("personalized_pagerank_impl basic", { test_that("personalized_pagerank_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(personalized_pagerank_impl( graph = NULL )) @@ -2387,7 +2237,6 @@ test_that("personalized_pagerank_impl errors", { test_that("personalized_pagerank_vs_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2413,7 +2262,6 @@ test_that("personalized_pagerank_vs_impl basic", { test_that("personalized_pagerank_vs_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( personalized_pagerank_vs_impl( graph = NULL, @@ -2426,7 +2274,6 @@ test_that("personalized_pagerank_vs_impl errors", { test_that("induced_subgraph_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2446,7 +2293,6 @@ test_that("induced_subgraph_impl basic", { test_that("induced_subgraph_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(induced_subgraph_impl( graph = NULL, vids = 1:2 @@ -2457,7 +2303,6 @@ test_that("induced_subgraph_impl errors", { test_that("subgraph_from_edges_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2477,7 +2322,6 @@ test_that("subgraph_from_edges_impl basic", { test_that("subgraph_from_edges_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(subgraph_from_edges_impl( graph = NULL, eids = 1 @@ -2488,7 +2332,6 @@ test_that("subgraph_from_edges_impl errors", { test_that("reverse_edges_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2506,7 +2349,6 @@ test_that("reverse_edges_impl basic", { test_that("reverse_edges_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(reverse_edges_impl( graph = NULL )) @@ -2520,7 +2362,6 @@ test_that("reverse_edges_impl errors", { test_that("path_length_hist_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2542,7 +2383,6 @@ test_that("path_length_hist_impl basic", { test_that("path_length_hist_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(path_length_hist_impl( graph = NULL )) @@ -2552,7 +2392,6 @@ test_that("path_length_hist_impl errors", { test_that("simplify_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2575,7 +2414,6 @@ test_that("simplify_impl basic", { test_that("simplify_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(simplify_impl( graph = NULL )) @@ -2585,7 +2423,6 @@ test_that("simplify_impl errors", { test_that("transitivity_undirected_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2607,7 +2444,6 @@ test_that("transitivity_undirected_impl basic", { test_that("transitivity_undirected_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(transitivity_undirected_impl( graph = NULL )) @@ -2617,7 +2453,6 @@ test_that("transitivity_undirected_impl errors", { test_that("transitivity_local_undirected_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2639,7 +2474,6 @@ test_that("transitivity_local_undirected_impl basic", { test_that("transitivity_local_undirected_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(transitivity_local_undirected_impl( graph = NULL )) @@ -2649,7 +2483,6 @@ test_that("transitivity_local_undirected_impl errors", { test_that("transitivity_avglocal_undirected_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2671,7 +2504,6 @@ test_that("transitivity_avglocal_undirected_impl basic", { test_that("transitivity_avglocal_undirected_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(transitivity_avglocal_undirected_impl( graph = NULL )) @@ -2681,7 +2513,6 @@ test_that("transitivity_avglocal_undirected_impl errors", { test_that("transitivity_barrat_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2705,7 +2536,6 @@ test_that("transitivity_barrat_impl basic", { test_that("transitivity_barrat_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(transitivity_barrat_impl( graph = NULL )) @@ -2715,7 +2545,6 @@ test_that("transitivity_barrat_impl errors", { test_that("ecc_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 4 ) @@ -2739,7 +2568,6 @@ test_that("ecc_impl basic", { test_that("ecc_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(ecc_impl( graph = NULL )) @@ -2749,7 +2577,6 @@ test_that("ecc_impl errors", { test_that("reciprocity_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2772,7 +2599,6 @@ test_that("reciprocity_impl basic", { test_that("reciprocity_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(reciprocity_impl( graph = NULL )) @@ -2782,7 +2608,6 @@ test_that("reciprocity_impl errors", { test_that("maxdegree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2805,7 +2630,6 @@ test_that("maxdegree_impl basic", { test_that("maxdegree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(maxdegree_impl( graph = NULL )) @@ -2815,7 +2639,6 @@ test_that("maxdegree_impl errors", { test_that("density_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2837,7 +2660,6 @@ test_that("density_impl basic", { test_that("density_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(density_impl( graph = NULL )) @@ -2847,7 +2669,6 @@ test_that("density_impl errors", { test_that("mean_degree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2869,7 +2690,6 @@ test_that("mean_degree_impl basic", { test_that("mean_degree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(mean_degree_impl( graph = NULL )) @@ -2879,7 +2699,6 @@ test_that("mean_degree_impl errors", { test_that("feedback_arc_set_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2901,7 +2720,6 @@ test_that("feedback_arc_set_impl basic", { test_that("feedback_arc_set_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(feedback_arc_set_impl( graph = NULL )) @@ -2911,7 +2729,6 @@ test_that("feedback_arc_set_impl errors", { test_that("feedback_vertex_set_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2929,7 +2746,6 @@ test_that("feedback_vertex_set_impl basic", { test_that("feedback_vertex_set_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(feedback_vertex_set_impl( graph = NULL )) @@ -2939,7 +2755,6 @@ test_that("feedback_vertex_set_impl errors", { test_that("is_loop_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2957,7 +2772,6 @@ test_that("is_loop_impl basic", { test_that("is_loop_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_loop_impl( graph = NULL )) @@ -2967,7 +2781,6 @@ test_that("is_loop_impl errors", { test_that("is_dag_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -2985,7 +2798,6 @@ test_that("is_dag_impl basic", { test_that("is_dag_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_dag_impl( graph = NULL )) @@ -2995,7 +2807,6 @@ test_that("is_dag_impl errors", { test_that("is_acyclic_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3013,7 +2824,6 @@ test_that("is_acyclic_impl basic", { test_that("is_acyclic_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_acyclic_impl( graph = NULL )) @@ -3023,7 +2833,6 @@ test_that("is_acyclic_impl errors", { test_that("is_simple_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3041,7 +2850,6 @@ test_that("is_simple_impl basic", { test_that("is_simple_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_simple_impl( graph = NULL )) @@ -3051,7 +2859,6 @@ test_that("is_simple_impl errors", { test_that("is_multiple_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3069,7 +2876,6 @@ test_that("is_multiple_impl basic", { test_that("is_multiple_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_multiple_impl( graph = NULL )) @@ -3079,7 +2885,6 @@ test_that("is_multiple_impl errors", { test_that("has_loop_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3097,7 +2902,6 @@ test_that("has_loop_impl basic", { test_that("has_loop_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(has_loop_impl( graph = NULL )) @@ -3107,7 +2911,6 @@ test_that("has_loop_impl errors", { test_that("has_multiple_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3125,7 +2928,6 @@ test_that("has_multiple_impl basic", { test_that("has_multiple_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(has_multiple_impl( graph = NULL )) @@ -3135,7 +2937,6 @@ test_that("has_multiple_impl errors", { test_that("count_loops_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3153,7 +2954,6 @@ test_that("count_loops_impl basic", { test_that("count_loops_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(count_loops_impl( graph = NULL )) @@ -3163,7 +2963,6 @@ test_that("count_loops_impl errors", { test_that("count_multiple_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3181,7 +2980,6 @@ test_that("count_multiple_impl basic", { test_that("count_multiple_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(count_multiple_impl( graph = NULL )) @@ -3191,7 +2989,6 @@ test_that("count_multiple_impl errors", { test_that("is_perfect_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3209,7 +3006,6 @@ test_that("is_perfect_impl basic", { test_that("is_perfect_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_perfect_impl( graph = NULL )) @@ -3219,7 +3015,6 @@ test_that("is_perfect_impl errors", { test_that("eigenvector_centrality_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3242,7 +3037,6 @@ test_that("eigenvector_centrality_impl basic", { test_that("eigenvector_centrality_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(eigenvector_centrality_impl( graph = NULL )) @@ -3252,7 +3046,6 @@ test_that("eigenvector_centrality_impl errors", { test_that("hub_and_authority_scores_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(5) expect_snapshot(hub_and_authority_scores_impl( graph = g @@ -3271,7 +3064,6 @@ test_that("hub_and_authority_scores_impl basic", { test_that("hub_and_authority_scores_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(hub_and_authority_scores_impl( graph = NULL )) @@ -3281,7 +3073,6 @@ test_that("hub_and_authority_scores_impl errors", { test_that("unfold_tree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3306,7 +3097,6 @@ test_that("unfold_tree_impl basic", { test_that("unfold_tree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(unfold_tree_impl( graph = NULL, roots = 1 @@ -3317,7 +3107,6 @@ test_that("unfold_tree_impl errors", { test_that("is_mutual_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3339,7 +3128,6 @@ test_that("is_mutual_impl basic", { test_that("is_mutual_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_mutual_impl( graph = NULL )) @@ -3349,7 +3137,6 @@ test_that("is_mutual_impl errors", { test_that("has_mutual_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3371,7 +3158,6 @@ test_that("has_mutual_impl basic", { test_that("has_mutual_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(has_mutual_impl( graph = NULL )) @@ -3381,7 +3167,6 @@ test_that("has_mutual_impl errors", { test_that("maximum_cardinality_search_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3399,7 +3184,6 @@ test_that("maximum_cardinality_search_impl basic", { test_that("maximum_cardinality_search_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(maximum_cardinality_search_impl( graph = NULL )) @@ -3409,7 +3193,6 @@ test_that("maximum_cardinality_search_impl errors", { test_that("avg_nearest_neighbor_degree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3432,7 +3215,6 @@ test_that("avg_nearest_neighbor_degree_impl basic", { test_that("avg_nearest_neighbor_degree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(avg_nearest_neighbor_degree_impl( graph = NULL )) @@ -3442,7 +3224,6 @@ test_that("avg_nearest_neighbor_degree_impl errors", { test_that("degree_correlation_vector_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3466,7 +3247,6 @@ test_that("degree_correlation_vector_impl basic", { test_that("degree_correlation_vector_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(degree_correlation_vector_impl( graph = NULL )) @@ -3476,7 +3256,6 @@ test_that("degree_correlation_vector_impl errors", { test_that("rich_club_sequence_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3503,7 +3282,6 @@ test_that("rich_club_sequence_impl basic", { test_that("rich_club_sequence_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( rich_club_sequence_impl( graph = NULL, @@ -3516,7 +3294,6 @@ test_that("rich_club_sequence_impl errors", { test_that("strength_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3539,7 +3316,6 @@ test_that("strength_impl basic", { test_that("strength_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(strength_impl( graph = NULL )) @@ -3549,7 +3325,6 @@ test_that("strength_impl errors", { test_that("centralization_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(centralization_impl( scores = c(1, 2, 3) )) @@ -3568,7 +3343,6 @@ test_that("centralization_impl basic", { test_that("centralization_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(centralization_impl( scores = package_version("1.2.3") )) @@ -3578,7 +3352,6 @@ test_that("centralization_impl errors", { test_that("centralization_degree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3602,7 +3375,6 @@ test_that("centralization_degree_impl basic", { test_that("centralization_degree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(centralization_degree_impl( graph = NULL )) @@ -3612,7 +3384,6 @@ test_that("centralization_degree_impl errors", { test_that("centralization_degree_tmax_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(centralization_degree_tmax_impl( nodes = 3, loops = TRUE @@ -3633,7 +3404,6 @@ test_that("centralization_degree_tmax_impl basic", { test_that("centralization_degree_tmax_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( centralization_degree_tmax_impl( nodes = -1, @@ -3646,7 +3416,6 @@ test_that("centralization_degree_tmax_impl errors", { test_that("centralization_betweenness_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3669,7 +3438,6 @@ test_that("centralization_betweenness_impl basic", { test_that("centralization_betweenness_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(centralization_betweenness_impl( graph = NULL )) @@ -3679,7 +3447,6 @@ test_that("centralization_betweenness_impl errors", { test_that("centralization_betweenness_tmax_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(centralization_betweenness_tmax_impl( nodes = 3, directed = TRUE @@ -3699,7 +3466,6 @@ test_that("centralization_betweenness_tmax_impl basic", { test_that("centralization_betweenness_tmax_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( centralization_betweenness_tmax_impl( nodes = -1, @@ -3712,7 +3478,6 @@ test_that("centralization_betweenness_tmax_impl errors", { test_that("centralization_closeness_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3735,7 +3500,6 @@ test_that("centralization_closeness_impl basic", { test_that("centralization_closeness_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(centralization_closeness_impl( graph = NULL )) @@ -3745,7 +3509,6 @@ test_that("centralization_closeness_impl errors", { test_that("centralization_closeness_tmax_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(centralization_closeness_tmax_impl( nodes = 3 )) @@ -3763,7 +3526,6 @@ test_that("centralization_closeness_tmax_impl basic", { test_that("centralization_closeness_tmax_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(centralization_closeness_tmax_impl( nodes = -1 )) @@ -3773,7 +3535,6 @@ test_that("centralization_closeness_tmax_impl errors", { test_that("centralization_eigenvector_centrality_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3796,7 +3557,6 @@ test_that("centralization_eigenvector_centrality_impl basic", { test_that("centralization_eigenvector_centrality_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( centralization_eigenvector_centrality_impl( graph = NULL @@ -3808,7 +3568,6 @@ test_that("centralization_eigenvector_centrality_impl errors", { test_that("centralization_eigenvector_centrality_tmax_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(centralization_eigenvector_centrality_tmax_impl( nodes = 3 )) @@ -3826,7 +3585,6 @@ test_that("centralization_eigenvector_centrality_tmax_impl basic", { test_that("centralization_eigenvector_centrality_tmax_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( centralization_eigenvector_centrality_tmax_impl( nodes = -1 @@ -3838,7 +3596,6 @@ test_that("centralization_eigenvector_centrality_tmax_impl errors", { test_that("assortativity_nominal_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3864,7 +3621,6 @@ test_that("assortativity_nominal_impl basic", { test_that("assortativity_nominal_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(assortativity_nominal_impl( graph = NULL, types = c(1, 2, 1) @@ -3875,7 +3631,6 @@ test_that("assortativity_nominal_impl errors", { test_that("assortativity_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3901,7 +3656,6 @@ test_that("assortativity_impl basic", { test_that("assortativity_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(assortativity_impl( graph = NULL, values = c(1, 2, 1) @@ -3912,7 +3666,6 @@ test_that("assortativity_impl errors", { test_that("assortativity_degree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3934,7 +3687,6 @@ test_that("assortativity_degree_impl basic", { test_that("assortativity_degree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(assortativity_degree_impl( graph = NULL )) @@ -3944,7 +3696,6 @@ test_that("assortativity_degree_impl errors", { test_that("joint_degree_matrix_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -3967,7 +3718,6 @@ test_that("joint_degree_matrix_impl basic", { test_that("joint_degree_matrix_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(joint_degree_matrix_impl( graph = NULL )) @@ -3977,7 +3727,6 @@ test_that("joint_degree_matrix_impl errors", { test_that("joint_degree_distribution_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4004,7 +3753,6 @@ test_that("joint_degree_distribution_impl basic", { test_that("joint_degree_distribution_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(joint_degree_distribution_impl( graph = NULL )) @@ -4014,7 +3762,6 @@ test_that("joint_degree_distribution_impl errors", { test_that("joint_type_distribution_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4041,7 +3788,6 @@ test_that("joint_type_distribution_impl basic", { test_that("joint_type_distribution_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( joint_type_distribution_impl( graph = NULL, @@ -4054,7 +3800,6 @@ test_that("joint_type_distribution_impl errors", { test_that("contract_vertices_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4074,7 +3819,6 @@ test_that("contract_vertices_impl basic", { test_that("contract_vertices_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(contract_vertices_impl( graph = NULL, mapping = c(1, 1, 2) @@ -4085,7 +3829,6 @@ test_that("contract_vertices_impl errors", { test_that("eccentricity_dijkstra_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4107,7 +3850,6 @@ test_that("eccentricity_dijkstra_impl basic", { test_that("eccentricity_dijkstra_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(eccentricity_dijkstra_impl( graph = NULL )) @@ -4117,7 +3859,6 @@ test_that("eccentricity_dijkstra_impl errors", { test_that("graph_center_dijkstra_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4139,7 +3880,6 @@ test_that("graph_center_dijkstra_impl basic", { test_that("graph_center_dijkstra_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(graph_center_dijkstra_impl( graph = NULL )) @@ -4149,7 +3889,6 @@ test_that("graph_center_dijkstra_impl errors", { test_that("radius_dijkstra_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4171,7 +3910,6 @@ test_that("radius_dijkstra_impl basic", { test_that("radius_dijkstra_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(radius_dijkstra_impl( graph = NULL )) @@ -4181,7 +3919,6 @@ test_that("radius_dijkstra_impl errors", { test_that("pseudo_diameter_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4207,7 +3944,6 @@ test_that("pseudo_diameter_impl basic", { test_that("pseudo_diameter_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(pseudo_diameter_impl( graph = NULL, start_vid = 1 @@ -4218,7 +3954,6 @@ test_that("pseudo_diameter_impl errors", { test_that("pseudo_diameter_dijkstra_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4244,7 +3979,6 @@ test_that("pseudo_diameter_dijkstra_impl basic", { test_that("pseudo_diameter_dijkstra_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( pseudo_diameter_dijkstra_impl( graph = NULL, @@ -4257,7 +3991,6 @@ test_that("pseudo_diameter_dijkstra_impl errors", { test_that("diversity_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4276,7 +4009,6 @@ test_that("diversity_impl basic", { test_that("diversity_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(diversity_impl( graph = NULL )) @@ -4286,7 +4018,6 @@ test_that("diversity_impl errors", { test_that("random_walk_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4315,7 +4046,6 @@ test_that("random_walk_impl basic", { test_that("random_walk_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(random_walk_impl( graph = NULL, start = 1, @@ -4327,7 +4057,6 @@ test_that("random_walk_impl errors", { test_that("global_efficiency_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4349,7 +4078,6 @@ test_that("global_efficiency_impl basic", { test_that("global_efficiency_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(global_efficiency_impl( graph = NULL )) @@ -4359,7 +4087,6 @@ test_that("global_efficiency_impl errors", { test_that("local_efficiency_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4382,7 +4109,6 @@ test_that("local_efficiency_impl basic", { test_that("local_efficiency_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(local_efficiency_impl( graph = NULL )) @@ -4392,7 +4118,6 @@ test_that("local_efficiency_impl errors", { test_that("average_local_efficiency_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4415,7 +4140,6 @@ test_that("average_local_efficiency_impl basic", { test_that("average_local_efficiency_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(average_local_efficiency_impl( graph = NULL )) @@ -4425,7 +4149,6 @@ test_that("average_local_efficiency_impl errors", { test_that("transitive_closure_dag_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3, directed = TRUE @@ -4444,7 +4167,6 @@ test_that("transitive_closure_dag_impl basic", { test_that("transitive_closure_dag_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(transitive_closure_dag_impl( graph = NULL )) @@ -4454,7 +4176,6 @@ test_that("transitive_closure_dag_impl errors", { test_that("transitive_closure_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4472,7 +4193,6 @@ test_that("transitive_closure_impl basic", { test_that("transitive_closure_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(transitive_closure_impl( graph = NULL )) @@ -4482,7 +4202,6 @@ test_that("transitive_closure_impl errors", { test_that("trussness_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4500,7 +4219,6 @@ test_that("trussness_impl basic", { test_that("trussness_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(trussness_impl( graph = NULL )) @@ -4510,7 +4228,6 @@ test_that("trussness_impl errors", { test_that("is_graphical_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(is_graphical_impl( out_deg = c(2, 2, 2) )) @@ -4529,7 +4246,6 @@ test_that("is_graphical_impl basic", { test_that("is_graphical_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_graphical_impl( out_deg = "a" )) @@ -4539,7 +4255,6 @@ test_that("is_graphical_impl errors", { test_that("bfs_simple_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4564,7 +4279,6 @@ test_that("bfs_simple_impl basic", { test_that("bfs_simple_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(bfs_simple_impl( graph = NULL, root = 1 @@ -4575,7 +4289,6 @@ test_that("bfs_simple_impl errors", { test_that("bipartite_projection_size_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 4 ) @@ -4594,7 +4307,6 @@ test_that("bipartite_projection_size_impl basic", { test_that("bipartite_projection_size_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(bipartite_projection_size_impl( graph = NULL )) @@ -4604,7 +4316,6 @@ test_that("bipartite_projection_size_impl errors", { test_that("biadjacency_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) m <- matrix(c(1, 0, 1, 0, 1, 1), nrow = 2) expect_snapshot(biadjacency_impl( incidence = m @@ -4625,7 +4336,6 @@ test_that("biadjacency_impl basic", { test_that("biadjacency_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(biadjacency_impl( incidence = "a" )) @@ -4635,7 +4345,6 @@ test_that("biadjacency_impl errors", { test_that("get_biadjacency_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4655,7 +4364,6 @@ test_that("get_biadjacency_impl basic", { test_that("get_biadjacency_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( get_biadjacency_impl( graph = NULL, @@ -4668,7 +4376,6 @@ test_that("get_biadjacency_impl errors", { test_that("is_bipartite_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4686,7 +4393,6 @@ test_that("is_bipartite_impl basic", { test_that("is_bipartite_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_bipartite_impl( graph = NULL )) @@ -4696,7 +4402,6 @@ test_that("is_bipartite_impl errors", { test_that("bipartite_game_gnp_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(bipartite_game_gnp_impl( n1 = 2, n2 = 2, @@ -4721,7 +4426,6 @@ test_that("bipartite_game_gnp_impl basic", { test_that("bipartite_game_gnp_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(bipartite_game_gnp_impl( n1 = -1, n2 = 2, @@ -4733,7 +4437,6 @@ test_that("bipartite_game_gnp_impl errors", { test_that("bipartite_game_gnm_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(bipartite_game_gnm_impl( n1 = 2, n2 = 2, @@ -4758,7 +4461,6 @@ test_that("bipartite_game_gnm_impl basic", { test_that("bipartite_game_gnm_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(bipartite_game_gnm_impl( n1 = -1, n2 = 2, @@ -4770,7 +4472,6 @@ test_that("bipartite_game_gnm_impl errors", { test_that("get_laplacian_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4794,7 +4495,6 @@ test_that("get_laplacian_impl basic", { test_that("get_laplacian_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_laplacian_impl( graph = NULL )) @@ -4804,7 +4504,6 @@ test_that("get_laplacian_impl errors", { test_that("get_laplacian_sparse_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4828,7 +4527,6 @@ test_that("get_laplacian_sparse_impl basic", { test_that("get_laplacian_sparse_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_laplacian_sparse_impl( graph = NULL )) @@ -4838,7 +4536,6 @@ test_that("get_laplacian_sparse_impl errors", { test_that("connected_components_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4861,7 +4558,6 @@ test_that("connected_components_impl basic", { test_that("connected_components_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(connected_components_impl( graph = NULL )) @@ -4871,7 +4567,6 @@ test_that("connected_components_impl errors", { test_that("is_connected_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4893,7 +4588,6 @@ test_that("is_connected_impl basic", { test_that("is_connected_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_connected_impl( graph = NULL )) @@ -4903,7 +4597,6 @@ test_that("is_connected_impl errors", { test_that("articulation_points_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4921,7 +4614,6 @@ test_that("articulation_points_impl basic", { test_that("articulation_points_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(articulation_points_impl( graph = NULL )) @@ -4931,7 +4623,6 @@ test_that("articulation_points_impl errors", { test_that("biconnected_components_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4949,7 +4640,6 @@ test_that("biconnected_components_impl basic", { test_that("biconnected_components_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(biconnected_components_impl( graph = NULL )) @@ -4959,7 +4649,6 @@ test_that("biconnected_components_impl errors", { test_that("bridges_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -4977,7 +4666,6 @@ test_that("bridges_impl basic", { test_that("bridges_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(bridges_impl( graph = NULL )) @@ -4987,7 +4675,6 @@ test_that("bridges_impl errors", { test_that("is_biconnected_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5005,7 +4692,6 @@ test_that("is_biconnected_impl basic", { test_that("is_biconnected_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_biconnected_impl( graph = NULL )) @@ -5015,7 +4701,6 @@ test_that("is_biconnected_impl errors", { test_that("count_reachable_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 5 ) @@ -5039,7 +4724,6 @@ test_that("count_reachable_impl basic", { test_that("count_reachable_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(count_reachable_impl( graph = NULL, mode = "out" @@ -5050,7 +4734,6 @@ test_that("count_reachable_impl errors", { test_that("bond_percolation_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5068,7 +4751,6 @@ test_that("bond_percolation_impl basic", { test_that("bond_percolation_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(bond_percolation_impl( graph = NULL )) @@ -5078,7 +4760,6 @@ test_that("bond_percolation_impl errors", { test_that("site_percolation_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5096,7 +4777,6 @@ test_that("site_percolation_impl basic", { test_that("site_percolation_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(site_percolation_impl( graph = NULL )) @@ -5106,7 +4786,6 @@ test_that("site_percolation_impl errors", { test_that("edgelist_percolation_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(edgelist_percolation_impl( edges = matrix(c(1, 2, 2, 3), ncol = 2) )) @@ -5120,7 +4799,6 @@ test_that("edgelist_percolation_impl basic", { test_that("edgelist_percolation_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(edgelist_percolation_impl( edges = "a" )) @@ -5130,7 +4808,6 @@ test_that("edgelist_percolation_impl errors", { test_that("is_clique_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5155,7 +4832,6 @@ test_that("is_clique_impl basic", { test_that("is_clique_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_clique_impl( graph = NULL, candidate = 1:2 @@ -5166,7 +4842,6 @@ test_that("is_clique_impl errors", { test_that("cliques_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5189,7 +4864,6 @@ test_that("cliques_impl basic", { test_that("cliques_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(cliques_impl( graph = NULL )) @@ -5199,7 +4873,6 @@ test_that("cliques_impl errors", { test_that("clique_size_hist_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5222,7 +4895,6 @@ test_that("clique_size_hist_impl basic", { test_that("clique_size_hist_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(clique_size_hist_impl( graph = NULL )) @@ -5232,7 +4904,6 @@ test_that("clique_size_hist_impl errors", { test_that("largest_cliques_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5250,7 +4921,6 @@ test_that("largest_cliques_impl basic", { test_that("largest_cliques_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(largest_cliques_impl( graph = NULL )) @@ -5260,7 +4930,6 @@ test_that("largest_cliques_impl errors", { test_that("maximal_cliques_hist_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5283,7 +4952,6 @@ test_that("maximal_cliques_hist_impl basic", { test_that("maximal_cliques_hist_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(maximal_cliques_hist_impl( graph = NULL )) @@ -5293,7 +4961,6 @@ test_that("maximal_cliques_hist_impl errors", { test_that("clique_number_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5311,7 +4978,6 @@ test_that("clique_number_impl basic", { test_that("clique_number_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(clique_number_impl( graph = NULL )) @@ -5321,7 +4987,6 @@ test_that("clique_number_impl errors", { test_that("weighted_cliques_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5346,7 +5011,6 @@ test_that("weighted_cliques_impl basic", { test_that("weighted_cliques_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(weighted_cliques_impl( graph = NULL )) @@ -5356,7 +5020,6 @@ test_that("weighted_cliques_impl errors", { test_that("largest_weighted_cliques_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5378,7 +5041,6 @@ test_that("largest_weighted_cliques_impl basic", { test_that("largest_weighted_cliques_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(largest_weighted_cliques_impl( graph = NULL )) @@ -5388,7 +5050,6 @@ test_that("largest_weighted_cliques_impl errors", { test_that("weighted_clique_number_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5410,7 +5071,6 @@ test_that("weighted_clique_number_impl basic", { test_that("weighted_clique_number_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(weighted_clique_number_impl( graph = NULL )) @@ -5420,7 +5080,6 @@ test_that("weighted_clique_number_impl errors", { test_that("is_independent_vertex_set_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5440,7 +5099,6 @@ test_that("is_independent_vertex_set_impl basic", { test_that("is_independent_vertex_set_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_independent_vertex_set_impl( graph = NULL, candidate = 1:2 @@ -5451,7 +5109,6 @@ test_that("is_independent_vertex_set_impl errors", { test_that("layout_random_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5469,7 +5126,6 @@ test_that("layout_random_impl basic", { test_that("layout_random_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(layout_random_impl( graph = NULL )) @@ -5479,7 +5135,6 @@ test_that("layout_random_impl errors", { test_that("layout_circle_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5501,7 +5156,6 @@ test_that("layout_circle_impl basic", { test_that("layout_circle_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(layout_circle_impl( graph = NULL )) @@ -5511,7 +5165,6 @@ test_that("layout_circle_impl errors", { test_that("layout_star_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5543,7 +5196,6 @@ test_that("layout_star_impl basic", { test_that("layout_star_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(layout_star_impl( graph = NULL )) @@ -5553,7 +5205,6 @@ test_that("layout_star_impl errors", { test_that("layout_grid_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5575,7 +5226,6 @@ test_that("layout_grid_impl basic", { test_that("layout_grid_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(layout_grid_impl( graph = NULL )) @@ -5585,7 +5235,6 @@ test_that("layout_grid_impl errors", { test_that("layout_grid_3d_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5608,7 +5257,6 @@ test_that("layout_grid_3d_impl basic", { test_that("layout_grid_3d_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(layout_grid_3d_impl( graph = NULL )) @@ -5618,7 +5266,6 @@ test_that("layout_grid_3d_impl errors", { test_that("roots_for_tree_layout_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5640,7 +5287,6 @@ test_that("roots_for_tree_layout_impl basic", { test_that("roots_for_tree_layout_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( roots_for_tree_layout_impl( graph = NULL, @@ -5654,7 +5300,6 @@ test_that("roots_for_tree_layout_impl errors", { test_that("layout_random_3d_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5672,7 +5317,6 @@ test_that("layout_random_3d_impl basic", { test_that("layout_random_3d_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(layout_random_3d_impl( graph = NULL )) @@ -5682,7 +5326,6 @@ test_that("layout_random_3d_impl errors", { test_that("layout_sphere_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5700,7 +5343,6 @@ test_that("layout_sphere_impl basic", { test_that("layout_sphere_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(layout_sphere_impl( graph = NULL )) @@ -5710,7 +5352,6 @@ test_that("layout_sphere_impl errors", { test_that("layout_sugiyama_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5736,7 +5377,6 @@ test_that("layout_sugiyama_impl basic", { test_that("layout_sugiyama_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(layout_sugiyama_impl( graph = NULL )) @@ -5746,7 +5386,6 @@ test_that("layout_sugiyama_impl errors", { test_that("layout_mds_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5769,7 +5408,6 @@ test_that("layout_mds_impl basic", { test_that("layout_mds_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(layout_mds_impl( graph = NULL )) @@ -5779,7 +5417,6 @@ test_that("layout_mds_impl errors", { test_that("layout_bipartite_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5806,7 +5443,6 @@ test_that("layout_bipartite_impl basic", { test_that("layout_bipartite_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( layout_bipartite_impl( graph = NULL, @@ -5819,7 +5455,6 @@ test_that("layout_bipartite_impl errors", { test_that("layout_gem_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5848,7 +5483,6 @@ test_that("layout_gem_impl basic", { test_that("layout_gem_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( layout_gem_impl( graph = NULL, @@ -5861,7 +5495,6 @@ test_that("layout_gem_impl errors", { test_that("layout_davidson_harel_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5894,7 +5527,6 @@ test_that("layout_davidson_harel_impl basic", { test_that("layout_davidson_harel_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( layout_davidson_harel_impl( graph = NULL, @@ -5907,7 +5539,6 @@ test_that("layout_davidson_harel_impl errors", { test_that("layout_umap_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5938,7 +5569,6 @@ test_that("layout_umap_impl basic", { test_that("layout_umap_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( layout_umap_impl( graph = NULL, @@ -5951,7 +5581,6 @@ test_that("layout_umap_impl errors", { test_that("layout_umap_3d_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -5982,7 +5611,6 @@ test_that("layout_umap_3d_impl basic", { test_that("layout_umap_3d_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( layout_umap_3d_impl( graph = NULL, @@ -5995,7 +5623,6 @@ test_that("layout_umap_3d_impl errors", { test_that("layout_umap_compute_weights_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6017,7 +5644,6 @@ test_that("layout_umap_compute_weights_impl basic", { test_that("layout_umap_compute_weights_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( layout_umap_compute_weights_impl( graph = NULL, @@ -6031,7 +5657,6 @@ test_that("layout_umap_compute_weights_impl errors", { test_that("layout_align_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6051,7 +5676,6 @@ test_that("layout_align_impl basic", { test_that("layout_align_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( layout_align_impl( graph = NULL, @@ -6064,7 +5688,6 @@ test_that("layout_align_impl errors", { test_that("similarity_dice_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6088,7 +5711,6 @@ test_that("similarity_dice_impl basic", { test_that("similarity_dice_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(similarity_dice_impl( graph = NULL )) @@ -6098,7 +5720,6 @@ test_that("similarity_dice_impl errors", { test_that("similarity_dice_es_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6122,7 +5743,6 @@ test_that("similarity_dice_es_impl basic", { test_that("similarity_dice_es_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(similarity_dice_es_impl( graph = NULL )) @@ -6132,7 +5752,6 @@ test_that("similarity_dice_es_impl errors", { test_that("similarity_dice_pairs_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 4 ) @@ -6158,7 +5777,6 @@ test_that("similarity_dice_pairs_impl basic", { test_that("similarity_dice_pairs_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( similarity_dice_pairs_impl( graph = NULL, @@ -6171,7 +5789,6 @@ test_that("similarity_dice_pairs_impl errors", { test_that("similarity_inverse_log_weighted_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6194,7 +5811,6 @@ test_that("similarity_inverse_log_weighted_impl basic", { test_that("similarity_inverse_log_weighted_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(similarity_inverse_log_weighted_impl( graph = NULL )) @@ -6204,7 +5820,6 @@ test_that("similarity_inverse_log_weighted_impl errors", { test_that("similarity_jaccard_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6228,7 +5843,6 @@ test_that("similarity_jaccard_impl basic", { test_that("similarity_jaccard_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(similarity_jaccard_impl( graph = NULL )) @@ -6238,7 +5852,6 @@ test_that("similarity_jaccard_impl errors", { test_that("similarity_jaccard_es_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6262,7 +5875,6 @@ test_that("similarity_jaccard_es_impl basic", { test_that("similarity_jaccard_es_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(similarity_jaccard_es_impl( graph = NULL )) @@ -6272,7 +5884,6 @@ test_that("similarity_jaccard_es_impl errors", { test_that("similarity_jaccard_pairs_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 4 ) @@ -6298,7 +5909,6 @@ test_that("similarity_jaccard_pairs_impl basic", { test_that("similarity_jaccard_pairs_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( similarity_jaccard_pairs_impl( graph = NULL, @@ -6311,7 +5921,6 @@ test_that("similarity_jaccard_pairs_impl errors", { test_that("compare_communities_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(compare_communities_impl( comm1 = c(1, 2, 1), comm2 = c(2, 1, 2) @@ -6332,7 +5941,6 @@ test_that("compare_communities_impl basic", { test_that("compare_communities_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(compare_communities_impl( comm1 = "a", comm2 = c(2, 1, 2) @@ -6343,7 +5951,6 @@ test_that("compare_communities_impl errors", { test_that("modularity_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6370,7 +5977,6 @@ test_that("modularity_impl basic", { test_that("modularity_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(modularity_impl( graph = NULL, membership = c(1, 2, 1) @@ -6381,7 +5987,6 @@ test_that("modularity_impl errors", { test_that("modularity_matrix_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6405,7 +6010,6 @@ test_that("modularity_matrix_impl basic", { test_that("modularity_matrix_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(modularity_matrix_impl( graph = NULL )) @@ -6415,7 +6019,6 @@ test_that("modularity_matrix_impl errors", { test_that("community_fluid_communities_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6435,7 +6038,6 @@ test_that("community_fluid_communities_impl basic", { test_that("community_fluid_communities_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( community_fluid_communities_impl( graph = NULL, @@ -6448,7 +6050,6 @@ test_that("community_fluid_communities_impl errors", { test_that("community_label_propagation_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6473,7 +6074,6 @@ test_that("community_label_propagation_impl basic", { test_that("community_label_propagation_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(community_label_propagation_impl( graph = NULL )) @@ -6483,7 +6083,6 @@ test_that("community_label_propagation_impl errors", { test_that("community_multilevel_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6506,7 +6105,6 @@ test_that("community_multilevel_impl basic", { test_that("community_multilevel_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(community_multilevel_impl( graph = NULL )) @@ -6516,7 +6114,6 @@ test_that("community_multilevel_impl errors", { test_that("community_optimal_modularity_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6538,7 +6135,6 @@ test_that("community_optimal_modularity_impl basic", { test_that("community_optimal_modularity_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(community_optimal_modularity_impl( graph = NULL )) @@ -6548,7 +6144,6 @@ test_that("community_optimal_modularity_impl errors", { test_that("community_leiden_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6580,7 +6175,6 @@ test_that("community_leiden_impl basic", { test_that("community_leiden_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(community_leiden_impl( graph = NULL, resolution = 1 @@ -6591,7 +6185,6 @@ test_that("community_leiden_impl errors", { test_that("split_join_distance_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(split_join_distance_impl( comm1 = c(1, 2, 1), comm2 = c(2, 1, 2) @@ -6607,7 +6200,6 @@ test_that("split_join_distance_impl basic", { test_that("split_join_distance_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(split_join_distance_impl( comm1 = "a", comm2 = c(2, 1, 2) @@ -6618,7 +6210,6 @@ test_that("split_join_distance_impl errors", { test_that("community_infomap_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6642,7 +6233,6 @@ test_that("community_infomap_impl basic", { test_that("community_infomap_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(community_infomap_impl( graph = NULL )) @@ -6652,7 +6242,6 @@ test_that("community_infomap_impl errors", { test_that("graphlets_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6676,7 +6265,6 @@ test_that("graphlets_impl basic", { test_that("graphlets_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(graphlets_impl( graph = NULL )) @@ -6686,7 +6274,6 @@ test_that("graphlets_impl errors", { test_that("hrg_fit_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -6704,7 +6291,6 @@ test_that("hrg_fit_impl basic", { test_that("hrg_fit_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(hrg_fit_impl( graph = NULL )) @@ -6715,7 +6301,6 @@ test_that("hrg_fit_impl errors", { test_that("hrg_sample_impl basic", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) expect_snapshot(hrg_sample_impl( @@ -6732,7 +6317,6 @@ test_that("hrg_sample_impl basic", { test_that("hrg_sample_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # FIXME: This test triggers an assertion failure in the C code when passing # NULL/empty HRG. The C code should validate input and return a proper error # message instead of an assertion failure. @@ -6746,7 +6330,6 @@ test_that("hrg_sample_impl errors", { test_that("hrg_sample_many_impl basic", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) expect_snapshot(hrg_sample_many_impl( @@ -6765,7 +6348,6 @@ test_that("hrg_sample_many_impl basic", { test_that("hrg_sample_many_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # FIXME: This test triggers an assertion failure in the C code when passing # NULL/empty HRG. The C code should validate input and return a proper error # message instead of an assertion failure. @@ -6780,7 +6362,6 @@ test_that("hrg_sample_many_impl errors", { test_that("hrg_game_impl basic", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) expect_snapshot(hrg_game_impl( @@ -6797,7 +6378,6 @@ test_that("hrg_game_impl basic", { test_that("hrg_game_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # FIXME: This test triggers an assertion failure in the C code when passing # NULL/empty HRG. The C code should validate input and return a proper error # message instead of an assertion failure. @@ -6819,7 +6399,6 @@ test_that("hrg_game_impl errors", { test_that("hrg_consensus_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(hrg_consensus_impl( graph = NULL )) @@ -6838,7 +6417,6 @@ test_that("hrg_consensus_impl errors", { test_that("hrg_predict_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(hrg_predict_impl( graph = NULL )) @@ -6848,7 +6426,6 @@ test_that("hrg_predict_impl errors", { test_that("hrg_create_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_tree(5) expect_snapshot(hrg_create_impl( graph = g, @@ -6865,7 +6442,6 @@ test_that("hrg_create_impl basic", { test_that("hrg_create_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(4, directed = TRUE) expect_snapshot_igraph_error(hrg_create_impl( graph = g, @@ -6878,7 +6454,6 @@ test_that("hrg_create_impl errors", { test_that("hrg_resize_impl basic", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) expect_snapshot(hrg_resize_impl( @@ -6897,7 +6472,6 @@ test_that("hrg_resize_impl basic", { test_that("hrg_resize_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(hrg_resize_impl( hrg = -1, newsize = 2 @@ -6909,7 +6483,6 @@ test_that("hrg_resize_impl errors", { test_that("hrg_size_impl basic", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) expect_snapshot(hrg_size_impl( @@ -6926,7 +6499,6 @@ test_that("hrg_size_impl basic", { test_that("hrg_size_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(hrg_size_impl( hrg = -1 )) @@ -6936,7 +6508,6 @@ test_that("hrg_size_impl errors", { test_that("from_hrg_dendrogram_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) expect_snapshot(from_hrg_dendrogram_impl( @@ -6952,7 +6523,6 @@ test_that("from_hrg_dendrogram_impl basic", { test_that("from_hrg_dendrogram_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(from_hrg_dendrogram_impl( hrg = -1 )) @@ -6962,7 +6532,6 @@ test_that("from_hrg_dendrogram_impl errors", { test_that("get_adjacency_sparse_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -6986,7 +6555,6 @@ test_that("get_adjacency_sparse_impl basic", { test_that("get_adjacency_sparse_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_adjacency_sparse_impl( graph = NULL )) @@ -6996,7 +6564,6 @@ test_that("get_adjacency_sparse_impl errors", { test_that("get_stochastic_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7019,7 +6586,6 @@ test_that("get_stochastic_impl basic", { test_that("get_stochastic_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_stochastic_impl( graph = NULL )) @@ -7029,7 +6595,6 @@ test_that("get_stochastic_impl errors", { test_that("get_stochastic_sparse_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7052,7 +6617,6 @@ test_that("get_stochastic_sparse_impl basic", { test_that("get_stochastic_sparse_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(get_stochastic_sparse_impl( graph = NULL )) @@ -7062,7 +6626,6 @@ test_that("get_stochastic_sparse_impl errors", { test_that("to_directed_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7084,7 +6647,6 @@ test_that("to_directed_impl basic", { test_that("to_directed_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(to_directed_impl( graph = NULL )) @@ -7094,7 +6656,6 @@ test_that("to_directed_impl errors", { test_that("to_undirected_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7117,7 +6678,6 @@ test_that("to_undirected_impl basic", { test_that("to_undirected_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(to_undirected_impl( graph = NULL )) @@ -7127,7 +6687,6 @@ test_that("to_undirected_impl errors", { test_that("motifs_randesu_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7150,7 +6709,6 @@ test_that("motifs_randesu_impl basic", { test_that("motifs_randesu_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(motifs_randesu_impl( graph = NULL )) @@ -7160,7 +6718,6 @@ test_that("motifs_randesu_impl errors", { test_that("motifs_randesu_estimate_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 6 ) @@ -7189,7 +6746,6 @@ test_that("motifs_randesu_estimate_impl basic", { test_that("motifs_randesu_estimate_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( motifs_randesu_estimate_impl( graph = NULL, @@ -7203,7 +6759,6 @@ test_that("motifs_randesu_estimate_impl errors", { test_that("motifs_randesu_no_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7226,7 +6781,6 @@ test_that("motifs_randesu_no_impl basic", { test_that("motifs_randesu_no_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7244,7 +6798,6 @@ test_that("motifs_randesu_no_impl errors", { test_that("dyad_census_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7262,7 +6815,6 @@ test_that("dyad_census_impl basic", { test_that("dyad_census_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(dyad_census_impl( graph = NULL )) @@ -7272,7 +6824,6 @@ test_that("dyad_census_impl errors", { test_that("triad_census_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7292,7 +6843,6 @@ test_that("triad_census_impl basic", { test_that("triad_census_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(triad_census_impl( graph = NULL )) @@ -7302,7 +6852,6 @@ test_that("triad_census_impl errors", { test_that("count_adjacent_triangles_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7324,7 +6873,6 @@ test_that("count_adjacent_triangles_impl basic", { test_that("count_adjacent_triangles_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(count_adjacent_triangles_impl( graph = NULL )) @@ -7334,7 +6882,6 @@ test_that("count_adjacent_triangles_impl errors", { test_that("count_triangles_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7352,7 +6899,6 @@ test_that("count_triangles_impl basic", { test_that("count_triangles_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(count_triangles_impl( graph = NULL )) @@ -7362,7 +6908,6 @@ test_that("count_triangles_impl errors", { test_that("local_scan_0_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7385,7 +6930,6 @@ test_that("local_scan_0_impl basic", { test_that("local_scan_0_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(local_scan_0_impl( graph = NULL )) @@ -7395,7 +6939,6 @@ test_that("local_scan_0_impl errors", { test_that("local_scan_0_them_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -7425,7 +6968,6 @@ test_that("local_scan_0_them_impl basic", { test_that("local_scan_0_them_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) them <- path_graph_impl( n = 3 ) @@ -7441,7 +6983,6 @@ test_that("local_scan_0_them_impl errors", { test_that("local_scan_1_ecount_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7464,7 +7005,6 @@ test_that("local_scan_1_ecount_impl basic", { test_that("local_scan_1_ecount_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(local_scan_1_ecount_impl( graph = NULL )) @@ -7474,7 +7014,6 @@ test_that("local_scan_1_ecount_impl errors", { test_that("local_scan_1_ecount_them_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -7504,7 +7043,6 @@ test_that("local_scan_1_ecount_them_impl basic", { test_that("local_scan_1_ecount_them_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) them <- path_graph_impl( n = 3 ) @@ -7520,7 +7058,6 @@ test_that("local_scan_1_ecount_them_impl errors", { test_that("local_scan_k_ecount_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7546,7 +7083,6 @@ test_that("local_scan_k_ecount_impl basic", { test_that("local_scan_k_ecount_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(local_scan_k_ecount_impl( graph = NULL, k = 1 @@ -7557,7 +7093,6 @@ test_that("local_scan_k_ecount_impl errors", { test_that("local_scan_k_ecount_them_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -7590,7 +7125,6 @@ test_that("local_scan_k_ecount_them_impl basic", { test_that("local_scan_k_ecount_them_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) them <- path_graph_impl( n = 3 ) @@ -7607,7 +7141,6 @@ test_that("local_scan_k_ecount_them_impl errors", { test_that("local_scan_neighborhood_ecount_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 4 ) @@ -7632,7 +7165,6 @@ test_that("local_scan_neighborhood_ecount_impl basic", { test_that("local_scan_neighborhood_ecount_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( local_scan_neighborhood_ecount_impl( graph = NULL, @@ -7645,7 +7177,6 @@ test_that("local_scan_neighborhood_ecount_impl errors", { test_that("local_scan_subset_ecount_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 4 ) @@ -7670,7 +7201,6 @@ test_that("local_scan_subset_ecount_impl basic", { test_that("local_scan_subset_ecount_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 4 ) @@ -7687,7 +7217,6 @@ test_that("local_scan_subset_ecount_impl errors", { test_that("list_triangles_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7705,7 +7234,6 @@ test_that("list_triangles_impl basic", { test_that("list_triangles_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(list_triangles_impl( graph = NULL )) @@ -7715,7 +7243,6 @@ test_that("list_triangles_impl errors", { test_that("join_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -7739,7 +7266,6 @@ test_that("join_impl basic", { test_that("join_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) right <- path_graph_impl( n = 3 ) @@ -7753,7 +7279,6 @@ test_that("join_impl errors", { test_that("induced_subgraph_map_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7780,7 +7305,6 @@ test_that("induced_subgraph_map_impl basic", { test_that("induced_subgraph_map_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( induced_subgraph_map_impl( graph = NULL, @@ -7794,7 +7318,6 @@ test_that("induced_subgraph_map_impl errors", { test_that("mycielskian_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7816,7 +7339,6 @@ test_that("mycielskian_impl basic", { test_that("mycielskian_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(mycielskian_impl( graph = NULL )) @@ -7826,7 +7348,6 @@ test_that("mycielskian_impl errors", { test_that("product_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -7855,7 +7376,6 @@ test_that("product_impl basic", { test_that("product_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g2 <- path_graph_impl( n = 3 ) @@ -7869,7 +7389,6 @@ test_that("product_impl errors", { test_that("rooted_product_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -7895,7 +7414,6 @@ test_that("rooted_product_impl basic", { test_that("rooted_product_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g2 <- path_graph_impl( n = 3 ) @@ -7912,7 +7430,6 @@ test_that("rooted_product_impl errors", { test_that("gomory_hu_tree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7934,7 +7451,6 @@ test_that("gomory_hu_tree_impl basic", { test_that("gomory_hu_tree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(gomory_hu_tree_impl( graph = NULL )) @@ -7944,7 +7460,6 @@ test_that("gomory_hu_tree_impl errors", { test_that("maxflow_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -7972,7 +7487,6 @@ test_that("maxflow_impl basic", { test_that("maxflow_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(maxflow_impl( graph = NULL, source = 1, @@ -7984,7 +7498,6 @@ test_that("maxflow_impl errors", { test_that("residual_graph_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8006,7 +7519,6 @@ test_that("residual_graph_impl basic", { test_that("residual_graph_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( residual_graph_impl( graph = NULL, @@ -8020,7 +7532,6 @@ test_that("residual_graph_impl errors", { test_that("reverse_residual_graph_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8042,7 +7553,6 @@ test_that("reverse_residual_graph_impl basic", { test_that("reverse_residual_graph_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( reverse_residual_graph_impl( graph = NULL, @@ -8056,7 +7566,6 @@ test_that("reverse_residual_graph_impl errors", { test_that("st_mincut_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8084,7 +7593,6 @@ test_that("st_mincut_impl basic", { test_that("st_mincut_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(st_mincut_impl( graph = NULL, source = 1, @@ -8096,7 +7604,6 @@ test_that("st_mincut_impl errors", { test_that("dominator_tree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3, directed = TRUE @@ -8122,7 +7629,6 @@ test_that("dominator_tree_impl basic", { test_that("dominator_tree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(dominator_tree_impl( graph = NULL, root = 1 @@ -8133,7 +7639,6 @@ test_that("dominator_tree_impl errors", { test_that("all_st_cuts_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3, directed = TRUE @@ -8156,7 +7661,6 @@ test_that("all_st_cuts_impl basic", { test_that("all_st_cuts_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(all_st_cuts_impl( graph = NULL, source = 1, @@ -8168,7 +7672,6 @@ test_that("all_st_cuts_impl errors", { test_that("all_st_mincuts_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3, directed = TRUE @@ -8197,7 +7700,6 @@ test_that("all_st_mincuts_impl basic", { test_that("all_st_mincuts_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( all_st_mincuts_impl( graph = NULL, @@ -8211,7 +7713,6 @@ test_that("all_st_mincuts_impl errors", { test_that("even_tarjan_reduction_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8229,7 +7730,6 @@ test_that("even_tarjan_reduction_impl basic", { test_that("even_tarjan_reduction_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(even_tarjan_reduction_impl( graph = NULL )) @@ -8239,7 +7739,6 @@ test_that("even_tarjan_reduction_impl errors", { test_that("is_separator_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8259,7 +7758,6 @@ test_that("is_separator_impl basic", { test_that("is_separator_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_separator_impl( graph = NULL, candidate = 1:2 @@ -8270,7 +7768,6 @@ test_that("is_separator_impl errors", { test_that("is_minimal_separator_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8290,7 +7787,6 @@ test_that("is_minimal_separator_impl basic", { test_that("is_minimal_separator_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_minimal_separator_impl( graph = NULL, candidate = 1:2 @@ -8301,7 +7797,6 @@ test_that("is_minimal_separator_impl errors", { test_that("all_minimal_st_separators_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8319,7 +7814,6 @@ test_that("all_minimal_st_separators_impl basic", { test_that("all_minimal_st_separators_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(all_minimal_st_separators_impl( graph = NULL )) @@ -8329,7 +7823,6 @@ test_that("all_minimal_st_separators_impl errors", { test_that("minimum_size_separators_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8347,7 +7840,6 @@ test_that("minimum_size_separators_impl basic", { test_that("minimum_size_separators_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(minimum_size_separators_impl( graph = NULL )) @@ -8357,7 +7849,6 @@ test_that("minimum_size_separators_impl errors", { test_that("isoclass_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8375,7 +7866,6 @@ test_that("isoclass_impl basic", { test_that("isoclass_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(isoclass_impl( graph = NULL )) @@ -8385,7 +7875,6 @@ test_that("isoclass_impl errors", { test_that("isomorphic_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -8409,7 +7898,6 @@ test_that("isomorphic_impl basic", { test_that("isomorphic_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) graph2 <- path_graph_impl( n = 3 ) @@ -8423,7 +7911,6 @@ test_that("isomorphic_impl errors", { test_that("isoclass_subgraph_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 5 ) @@ -8443,7 +7930,6 @@ test_that("isoclass_subgraph_impl basic", { test_that("isoclass_subgraph_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(isoclass_subgraph_impl( graph = NULL, vids = 1:2 @@ -8454,7 +7940,6 @@ test_that("isoclass_subgraph_impl errors", { test_that("isoclass_create_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(isoclass_create_impl( size = 3, number = 1 @@ -8475,7 +7960,6 @@ test_that("isoclass_create_impl basic", { test_that("isoclass_create_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(isoclass_create_impl( size = "a", number = 1 @@ -8486,7 +7970,6 @@ test_that("isoclass_create_impl errors", { test_that("isomorphic_vf2_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -8518,7 +8001,6 @@ test_that("isomorphic_vf2_impl basic", { test_that("isomorphic_vf2_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) graph2 <- path_graph_impl( n = 3 ) @@ -8535,7 +8017,6 @@ test_that("isomorphic_vf2_impl errors", { test_that("count_isomorphisms_vf2_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -8567,7 +8048,6 @@ test_that("count_isomorphisms_vf2_impl basic", { test_that("count_isomorphisms_vf2_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) graph2 <- path_graph_impl( n = 3 ) @@ -8583,7 +8063,6 @@ test_that("count_isomorphisms_vf2_impl errors", { test_that("get_isomorphisms_vf2_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -8615,7 +8094,6 @@ test_that("get_isomorphisms_vf2_impl basic", { test_that("get_isomorphisms_vf2_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) graph2 <- path_graph_impl( n = 3 ) @@ -8631,7 +8109,6 @@ test_that("get_isomorphisms_vf2_impl errors", { test_that("subisomorphic_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -8655,7 +8132,6 @@ test_that("subisomorphic_impl basic", { test_that("subisomorphic_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) graph2 <- path_graph_impl( n = 3 ) @@ -8669,7 +8145,6 @@ test_that("subisomorphic_impl errors", { test_that("subisomorphic_vf2_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -8701,7 +8176,6 @@ test_that("subisomorphic_vf2_impl basic", { test_that("subisomorphic_vf2_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) graph2 <- path_graph_impl( n = 3 ) @@ -8717,7 +8191,6 @@ test_that("subisomorphic_vf2_impl errors", { test_that("count_subisomorphisms_vf2_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -8749,7 +8222,6 @@ test_that("count_subisomorphisms_vf2_impl basic", { test_that("count_subisomorphisms_vf2_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) graph2 <- path_graph_impl( n = 3 ) @@ -8765,7 +8237,6 @@ test_that("count_subisomorphisms_vf2_impl errors", { test_that("get_subisomorphisms_vf2_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -8797,7 +8268,6 @@ test_that("get_subisomorphisms_vf2_impl basic", { test_that("get_subisomorphisms_vf2_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) graph2 <- path_graph_impl( n = 3 ) @@ -8813,7 +8283,6 @@ test_that("get_subisomorphisms_vf2_impl errors", { test_that("canonical_permutation_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8836,7 +8305,6 @@ test_that("canonical_permutation_impl basic", { test_that("canonical_permutation_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(canonical_permutation_impl( graph = NULL )) @@ -8846,7 +8314,6 @@ test_that("canonical_permutation_impl errors", { test_that("permute_vertices_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8866,7 +8333,6 @@ test_that("permute_vertices_impl basic", { test_that("permute_vertices_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(permute_vertices_impl( graph = NULL, permutation = 3:1 @@ -8877,7 +8343,6 @@ test_that("permute_vertices_impl errors", { test_that("isomorphic_bliss_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -8908,7 +8373,6 @@ test_that("isomorphic_bliss_impl basic", { test_that("isomorphic_bliss_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) graph2 <- path_graph_impl( n = 3 ) @@ -8922,7 +8386,6 @@ test_that("isomorphic_bliss_impl errors", { test_that("count_automorphisms_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8945,7 +8408,6 @@ test_that("count_automorphisms_impl basic", { test_that("count_automorphisms_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(count_automorphisms_impl( graph = NULL )) @@ -8955,7 +8417,6 @@ test_that("count_automorphisms_impl errors", { test_that("automorphism_group_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -8979,7 +8440,6 @@ test_that("automorphism_group_impl basic", { test_that("automorphism_group_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(automorphism_group_impl( graph = NULL )) @@ -8989,7 +8449,6 @@ test_that("automorphism_group_impl errors", { test_that("simplify_and_colorize_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9007,7 +8466,6 @@ test_that("simplify_and_colorize_impl basic", { test_that("simplify_and_colorize_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(simplify_and_colorize_impl( graph = NULL )) @@ -9017,7 +8475,6 @@ test_that("simplify_and_colorize_impl errors", { test_that("graph_count_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(graph_count_impl( n = 3 )) @@ -9035,7 +8492,6 @@ test_that("graph_count_impl basic", { test_that("graph_count_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(graph_count_impl( n = "a" )) @@ -9045,7 +8501,6 @@ test_that("graph_count_impl errors", { test_that("is_matching_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9070,7 +8525,6 @@ test_that("is_matching_impl basic", { test_that("is_matching_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_matching_impl( graph = NULL, matching = 1:2 @@ -9081,7 +8535,6 @@ test_that("is_matching_impl errors", { test_that("is_maximal_matching_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9106,7 +8559,6 @@ test_that("is_maximal_matching_impl basic", { test_that("is_maximal_matching_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_maximal_matching_impl( graph = NULL, matching = 1:2 @@ -9117,7 +8569,6 @@ test_that("is_maximal_matching_impl errors", { test_that("maximum_bipartite_matching_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9143,7 +8594,6 @@ test_that("maximum_bipartite_matching_impl basic", { test_that("maximum_bipartite_matching_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( maximum_bipartite_matching_impl( graph = NULL, @@ -9156,7 +8606,6 @@ test_that("maximum_bipartite_matching_impl errors", { test_that("adjacency_spectral_embedding_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9185,7 +8634,6 @@ test_that("adjacency_spectral_embedding_impl basic", { test_that("adjacency_spectral_embedding_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(adjacency_spectral_embedding_impl( graph = NULL, no = 2 @@ -9196,7 +8644,6 @@ test_that("adjacency_spectral_embedding_impl errors", { test_that("laplacian_spectral_embedding_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9216,7 +8663,6 @@ test_that("laplacian_spectral_embedding_impl basic", { test_that("laplacian_spectral_embedding_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(laplacian_spectral_embedding_impl( graph = NULL, no = 2 @@ -9227,7 +8673,6 @@ test_that("laplacian_spectral_embedding_impl errors", { test_that("eigen_adjacency_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9253,7 +8698,6 @@ test_that("eigen_adjacency_impl basic", { test_that("eigen_adjacency_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(eigen_adjacency_impl( graph = NULL )) @@ -9263,7 +8707,6 @@ test_that("eigen_adjacency_impl errors", { test_that("power_law_fit_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(power_law_fit_impl( data = c(1, 2, 3) )) @@ -9282,7 +8725,6 @@ test_that("power_law_fit_impl basic", { test_that("power_law_fit_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(power_law_fit_impl( data = "a" )) @@ -9292,7 +8734,6 @@ test_that("power_law_fit_impl errors", { test_that("sir_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9320,7 +8761,6 @@ test_that("sir_impl basic", { test_that("sir_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(sir_impl( graph = NULL, beta = 0.1, @@ -9332,7 +8772,6 @@ test_that("sir_impl errors", { test_that("convex_hull_2d_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(convex_hull_2d_impl( data = matrix(1:6, ncol = 2) )) @@ -9346,7 +8785,6 @@ test_that("convex_hull_2d_impl basic", { test_that("convex_hull_2d_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(convex_hull_2d_impl( data = "a" )) @@ -9356,7 +8794,6 @@ test_that("convex_hull_2d_impl errors", { test_that("dim_select_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(dim_select_impl( sv = c(1, 2, 3) )) @@ -9370,7 +8807,6 @@ test_that("dim_select_impl basic", { test_that("dim_select_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(dim_select_impl( sv = NULL )) @@ -9380,7 +8816,6 @@ test_that("dim_select_impl errors", { test_that("solve_lsap_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(solve_lsap_impl( c = matrix(1:4, ncol = 2), n = 2 @@ -9396,7 +8831,6 @@ test_that("solve_lsap_impl basic", { test_that("solve_lsap_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(solve_lsap_impl( c = "a", n = 2 @@ -9407,7 +8841,6 @@ test_that("solve_lsap_impl errors", { test_that("find_cycle_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9429,7 +8862,6 @@ test_that("find_cycle_impl basic", { test_that("find_cycle_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(find_cycle_impl( graph = NULL )) @@ -9439,7 +8871,6 @@ test_that("find_cycle_impl errors", { test_that("simple_cycles_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9463,7 +8894,6 @@ test_that("simple_cycles_impl basic", { test_that("simple_cycles_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(simple_cycles_impl( graph = NULL )) @@ -9473,7 +8903,6 @@ test_that("simple_cycles_impl errors", { test_that("is_eulerian_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9491,7 +8920,6 @@ test_that("is_eulerian_impl basic", { test_that("is_eulerian_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_eulerian_impl( graph = NULL )) @@ -9501,7 +8929,6 @@ test_that("is_eulerian_impl errors", { test_that("eulerian_path_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9519,7 +8946,6 @@ test_that("eulerian_path_impl basic", { test_that("eulerian_path_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(eulerian_path_impl( graph = NULL )) @@ -9529,7 +8955,6 @@ test_that("eulerian_path_impl errors", { test_that("eulerian_cycle_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl( n = 3 ) @@ -9554,7 +8979,6 @@ test_that("eulerian_cycle_impl basic", { test_that("eulerian_cycle_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(eulerian_cycle_impl( graph = NULL )) @@ -9564,7 +8988,6 @@ test_that("eulerian_cycle_impl errors", { test_that("fundamental_cycles_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9590,7 +9013,6 @@ test_that("fundamental_cycles_impl basic", { test_that("fundamental_cycles_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(fundamental_cycles_impl( graph = NULL, start = 1 @@ -9601,7 +9023,6 @@ test_that("fundamental_cycles_impl errors", { test_that("minimum_cycle_basis_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9626,7 +9047,6 @@ test_that("minimum_cycle_basis_impl basic", { test_that("minimum_cycle_basis_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(minimum_cycle_basis_impl( graph = NULL )) @@ -9636,7 +9056,6 @@ test_that("minimum_cycle_basis_impl errors", { test_that("is_tree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9659,7 +9078,6 @@ test_that("is_tree_impl basic", { test_that("is_tree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_tree_impl( graph = NULL )) @@ -9669,7 +9087,6 @@ test_that("is_tree_impl errors", { test_that("is_forest_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9692,7 +9109,6 @@ test_that("is_forest_impl basic", { test_that("is_forest_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_forest_impl( graph = NULL )) @@ -9702,7 +9118,6 @@ test_that("is_forest_impl errors", { test_that("from_prufer_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(from_prufer_impl( prufer = 1:2 )) @@ -9716,7 +9131,6 @@ test_that("from_prufer_impl basic", { test_that("from_prufer_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(from_prufer_impl( prufer = "a" )) @@ -9726,7 +9140,6 @@ test_that("from_prufer_impl errors", { test_that("to_prufer_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9744,7 +9157,6 @@ test_that("to_prufer_impl basic", { test_that("to_prufer_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(to_prufer_impl( graph = NULL )) @@ -9754,7 +9166,6 @@ test_that("to_prufer_impl errors", { test_that("tree_from_parent_vector_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(tree_from_parent_vector_impl( parents = c(-1, 1, 2, 3) )) @@ -9772,7 +9183,6 @@ test_that("tree_from_parent_vector_impl basic", { test_that("tree_from_parent_vector_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(tree_from_parent_vector_impl( parents = "a" )) @@ -9782,7 +9192,6 @@ test_that("tree_from_parent_vector_impl errors", { test_that("is_complete_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9800,7 +9209,6 @@ test_that("is_complete_impl basic", { test_that("is_complete_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_complete_impl( graph = NULL )) @@ -9810,7 +9218,6 @@ test_that("is_complete_impl errors", { test_that("random_spanning_tree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9830,7 +9237,6 @@ test_that("random_spanning_tree_impl basic", { test_that("random_spanning_tree_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(random_spanning_tree_impl( graph = NULL, vid = 1 @@ -9841,7 +9247,6 @@ test_that("random_spanning_tree_impl errors", { test_that("tree_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(tree_game_impl( n = 3 )) @@ -9860,7 +9265,6 @@ test_that("tree_game_impl basic", { test_that("tree_game_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(tree_game_impl( n = "a" )) @@ -9870,7 +9274,6 @@ test_that("tree_game_impl errors", { test_that("vertex_coloring_greedy_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9892,7 +9295,6 @@ test_that("vertex_coloring_greedy_impl basic", { test_that("vertex_coloring_greedy_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(vertex_coloring_greedy_impl( graph = NULL )) @@ -9902,7 +9304,6 @@ test_that("vertex_coloring_greedy_impl errors", { test_that("is_vertex_coloring_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9922,7 +9323,6 @@ test_that("is_vertex_coloring_impl basic", { test_that("is_vertex_coloring_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( is_vertex_coloring_impl( graph = NULL, @@ -9945,7 +9345,6 @@ test_that("is_vertex_coloring_impl errors", { test_that("is_bipartite_coloring_impl basic", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -9965,7 +9364,6 @@ test_that("is_bipartite_coloring_impl basic", { test_that("is_bipartite_coloring_impl errors", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( is_bipartite_coloring_impl( graph = NULL, @@ -9978,7 +9376,6 @@ test_that("is_bipartite_coloring_impl errors", { test_that("is_edge_coloring_impl basic", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -10002,7 +9399,6 @@ test_that("is_edge_coloring_impl basic", { test_that("is_edge_coloring_impl errors", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_edge_coloring_impl( graph = NULL, types = c(1, 2) @@ -10013,7 +9409,6 @@ test_that("is_edge_coloring_impl errors", { test_that("deterministic_optimal_imitation_impl basic", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -10045,7 +9440,6 @@ test_that("deterministic_optimal_imitation_impl basic", { test_that("deterministic_optimal_imitation_impl errors", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( deterministic_optimal_imitation_impl( graph = NULL, @@ -10060,7 +9454,6 @@ test_that("deterministic_optimal_imitation_impl errors", { test_that("moran_process_impl basic", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -10086,7 +9479,6 @@ test_that("moran_process_impl basic", { test_that("moran_process_impl errors", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( moran_process_impl( graph = NULL, @@ -10100,7 +9492,6 @@ test_that("moran_process_impl errors", { test_that("roulette_wheel_imitation_impl basic", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -10134,7 +9525,6 @@ test_that("roulette_wheel_imitation_impl basic", { test_that("roulette_wheel_imitation_impl errors", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( roulette_wheel_imitation_impl( graph = NULL, @@ -10150,7 +9540,6 @@ test_that("roulette_wheel_imitation_impl errors", { test_that("stochastic_imitation_impl basic", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -10184,7 +9573,6 @@ test_that("stochastic_imitation_impl basic", { test_that("stochastic_imitation_impl errors", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( stochastic_imitation_impl( graph = NULL, @@ -10200,7 +9588,6 @@ test_that("stochastic_imitation_impl errors", { test_that("invalidate_cache_impl basic", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -10218,7 +9605,6 @@ test_that("invalidate_cache_impl basic", { test_that("invalidate_cache_impl errors", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(invalidate_cache_impl( graph = NULL )) @@ -10228,7 +9614,6 @@ test_that("invalidate_cache_impl errors", { test_that("vertex_path_from_edge_path_impl basic", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) g <- path_graph_impl( n = 3 ) @@ -10256,7 +9641,6 @@ test_that("vertex_path_from_edge_path_impl basic", { test_that("vertex_path_from_edge_path_impl errors", { withr::local_seed(12345) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( vertex_path_from_edge_path_impl( graph = NULL, @@ -10294,7 +9678,6 @@ test_that("version_impl errors", { test_that("ecount_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_empty_graph(5) expect_snapshot(ecount_impl( graph = g @@ -10308,7 +9691,6 @@ test_that("ecount_impl basic", { test_that("ecount_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(ecount_impl( graph = NULL )) @@ -10318,7 +9700,6 @@ test_that("ecount_impl errors", { test_that("is_directed_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_empty_graph(5, directed = TRUE) expect_snapshot(is_directed_impl( graph = g @@ -10332,7 +9713,6 @@ test_that("is_directed_impl basic", { test_that("is_directed_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(is_directed_impl( graph = NULL )) @@ -10342,7 +9722,6 @@ test_that("is_directed_impl errors", { test_that("edges_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(c(1, 2, 2, 3, 3, 4), n = 4, directed = TRUE) # Get all edges @@ -10360,7 +9739,6 @@ test_that("edges_impl basic", { test_that("edges_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(edges_impl( graph = NULL, eids = 1 @@ -10371,7 +9749,6 @@ test_that("edges_impl errors", { test_that("add_vertices_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_empty_graph(3) g_new <- add_vertices_impl( @@ -10383,7 +9760,6 @@ test_that("add_vertices_impl basic", { test_that("add_vertices_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(add_vertices_impl( graph = NULL, nv = 1 @@ -10394,7 +9770,6 @@ test_that("add_vertices_impl errors", { test_that("delete_edges_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(c(1, 2, 2, 3, 3, 4), n = 4, directed = TRUE) g_new <- delete_edges_impl( @@ -10406,7 +9781,6 @@ test_that("delete_edges_impl basic", { test_that("delete_edges_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(delete_edges_impl( graph = NULL, edges = 1 @@ -10417,7 +9791,6 @@ test_that("delete_edges_impl errors", { test_that("delete_vertices_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(c(1, 2, 2, 3, 3, 4), n = 4, directed = TRUE) g_new <- delete_vertices_impl( @@ -10429,7 +9802,6 @@ test_that("delete_vertices_impl basic", { test_that("delete_vertices_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(delete_vertices_impl( graph = NULL, vertices = 1 @@ -10440,7 +9812,7 @@ test_that("delete_vertices_impl errors", { test_that("incident_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE, return.vs_es = FALSE) + local_igraph_options(return.vs_es = FALSE) g <- make_graph(c(1, 2, 2, 3, 3, 1), n = 3, directed = TRUE) expect_snapshot(incident_impl( @@ -10462,7 +9834,6 @@ test_that("incident_impl basic", { test_that("incident_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(incident_impl( graph = NULL, vid = 1 @@ -10471,7 +9842,6 @@ test_that("incident_impl errors", { test_that("famous_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(famous_impl( name = "Zachary" )) @@ -10479,7 +9849,6 @@ test_that("famous_impl basic", { test_that("famous_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(famous_impl( name = "NonexistentGraph" )) @@ -10489,7 +9858,6 @@ test_that("famous_impl errors", { test_that("constraint_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(c(1, 2, 2, 3, 3, 1), n = 3, directed = FALSE) result <- constraint_impl( graph = g @@ -10499,7 +9867,6 @@ test_that("constraint_impl basic", { test_that("constraint_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(constraint_impl( graph = NULL )) @@ -10509,7 +9876,6 @@ test_that("constraint_impl errors", { test_that("cocitation_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(c(1, 2, 1, 3, 2, 4, 3, 4), n = 4, directed = TRUE) result <- cocitation_impl( graph = g @@ -10519,7 +9885,6 @@ test_that("cocitation_impl basic", { test_that("cocitation_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(cocitation_impl( graph = NULL )) @@ -10529,7 +9894,6 @@ test_that("cocitation_impl errors", { test_that("bibcoupling_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(c(1, 2, 1, 3, 2, 4, 3, 4), n = 4, directed = TRUE) result <- bibcoupling_impl( graph = g @@ -10539,7 +9903,6 @@ test_that("bibcoupling_impl basic", { test_that("bibcoupling_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(bibcoupling_impl( graph = NULL )) @@ -10549,7 +9912,6 @@ test_that("bibcoupling_impl errors", { test_that("girth_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) result <- girth_impl( graph = g @@ -10559,7 +9921,6 @@ test_that("girth_impl basic", { test_that("girth_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(girth_impl( graph = NULL )) @@ -10569,7 +9930,6 @@ test_that("girth_impl errors", { test_that("coreness_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(c(1, 2, 2, 3, 3, 1, 3, 4), n = 4, directed = FALSE) expect_snapshot(coreness_impl( graph = g @@ -10578,7 +9938,6 @@ test_that("coreness_impl basic", { test_that("coreness_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(coreness_impl( graph = NULL )) @@ -10588,7 +9947,6 @@ test_that("coreness_impl errors", { test_that("union_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- make_graph(c(1, 2, 2, 3), n = 3) g2 <- make_graph(c(1, 3, 3, 4), n = 4) expect_snapshot(union_impl( @@ -10599,7 +9957,6 @@ test_that("union_impl basic", { test_that("union_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(union_impl( left = NULL, right = NULL @@ -10610,7 +9967,6 @@ test_that("union_impl errors", { test_that("intersection_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- make_graph(c(1, 2, 2, 3, 1, 3), n = 3) g2 <- make_graph(c(1, 2, 2, 3), n = 3) expect_snapshot(intersection_impl( @@ -10621,7 +9977,6 @@ test_that("intersection_impl basic", { test_that("intersection_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(intersection_impl( left = NULL, right = NULL @@ -10635,7 +9990,6 @@ test_that("intersection_impl errors", { test_that("star_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(star_impl(n = 5, mode = "out", center = 0)) expect_snapshot(star_impl(n = 6, mode = "in", center = 1)) expect_snapshot(star_impl(n = 4, mode = "undirected", center = 0)) @@ -10643,7 +9997,6 @@ test_that("star_impl basic", { test_that("ring_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(ring_impl( n = 5, directed = FALSE, @@ -10660,14 +10013,12 @@ test_that("ring_impl basic", { test_that("full_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(full_impl(n = 4, directed = FALSE, loops = FALSE)) expect_snapshot(full_impl(n = 3, directed = TRUE, loops = FALSE)) }) test_that("kary_tree_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(kary_tree_impl( n = 7, children = 2, @@ -10684,7 +10035,6 @@ test_that("kary_tree_impl basic", { test_that("barabasi_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(barabasi_game_impl( n = 10, power = 1, @@ -10703,7 +10053,6 @@ test_that("barabasi_game_impl basic", { test_that("growing_random_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(growing_random_game_impl( n = 10, m = 1, @@ -10714,13 +10063,11 @@ test_that("growing_random_game_impl basic", { test_that("grg_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(grg_game_impl(nodes = 10, radius = 0.3, torus = FALSE)) }) test_that("watts_strogatz_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(watts_strogatz_game_impl( dim = 1, size = 10, @@ -10733,7 +10080,6 @@ test_that("watts_strogatz_game_impl basic", { test_that("distances_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(distances_impl( graph = g, @@ -10745,7 +10091,6 @@ test_that("distances_impl basic", { test_that("diameter_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(10) expect_snapshot(diameter_impl( graph = g, @@ -10756,7 +10101,6 @@ test_that("diameter_impl basic", { test_that("get_shortest_paths_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(get_shortest_paths_impl( graph = g, @@ -10768,7 +10112,6 @@ test_that("get_shortest_paths_impl basic", { test_that("subcomponent_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(~ A-B-C, D-E-F) expect_snapshot(subcomponent_impl( graph = g, @@ -10781,14 +10124,12 @@ test_that("subcomponent_impl basic", { test_that("betweenness_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_star(5, mode = "undirected") expect_snapshot(betweenness_impl(graph = g, vids = V(g), directed = FALSE)) }) test_that("closeness_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(closeness_impl( graph = g, @@ -10799,7 +10140,6 @@ test_that("closeness_impl basic", { test_that("harmonic_centrality_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_star(5, mode = "undirected") expect_snapshot(harmonic_centrality_impl( graph = g, @@ -10810,7 +10150,6 @@ test_that("harmonic_centrality_impl basic", { test_that("pagerank_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5, directed = TRUE) expect_snapshot(pagerank_impl( graph = g, @@ -10822,7 +10161,6 @@ test_that("pagerank_impl basic", { test_that("hub_score_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_star(5, mode = "undirected") out <- hub_score_impl(graph = g, scale = TRUE, weights = NULL) # FIXME: out$vector unstable despite random seed @@ -10834,7 +10172,6 @@ test_that("hub_score_impl basic", { test_that("authority_score_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_star(5, mode = "undirected") out <- authority_score_impl(graph = g, scale = TRUE, weights = NULL) # FIXME: out$vector unstable despite random seed @@ -10848,28 +10185,24 @@ test_that("authority_score_impl basic", { test_that("community_walktrap_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(~ A-B-C-A, D-E-F-D, A-D) expect_snapshot(community_walktrap_impl(graph = g, steps = 4)) }) test_that("community_fastgreedy_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(~ A-B-C-A, D-E-F-D, A-D) expect_snapshot(community_fastgreedy_impl(graph = g)) }) test_that("community_edge_betweenness_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(~ A-B-C-A, D-E-F-D, A-D) expect_snapshot(community_edge_betweenness_impl(graph = g, directed = FALSE)) }) test_that("community_leading_eigenvector_callback_closure_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # Test with a simple graph g <- make_graph("Zachary") @@ -10900,7 +10233,6 @@ test_that("community_leading_eigenvector_callback_closure_impl basic", { test_that("community_leading_eigenvector_callback_closure_impl with start", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph("Zachary") # Create initial membership (0-based for the impl function) @@ -10926,7 +10258,6 @@ test_that("community_leading_eigenvector_callback_closure_impl with start", { test_that("community_leading_eigenvector_callback_closure_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph("Zachary") @@ -10943,14 +10274,12 @@ test_that("community_leading_eigenvector_callback_closure_impl errors", { test_that("edge_connectivity_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(edge_connectivity_impl(graph = g)) }) test_that("vertex_connectivity_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(vertex_connectivity_impl(graph = g)) }) @@ -10959,7 +10288,6 @@ test_that("vertex_connectivity_impl basic", { test_that("layout_sphere_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(layout_sphere_impl(graph = g)) }) @@ -10968,7 +10296,6 @@ test_that("layout_sphere_impl basic", { test_that("create_bipartite_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(create_bipartite_impl( types = c(FALSE, FALSE, TRUE, TRUE), edges = c(0, 2, 0, 3, 1, 2, 1, 3), @@ -10978,7 +10305,6 @@ test_that("create_bipartite_impl basic", { test_that("bipartite_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(bipartite_game_impl( type = "gnp", n1 = 5, @@ -10999,14 +10325,12 @@ test_that("bipartite_game_impl basic", { test_that("decompose_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(~ A-B-C, D-E) expect_snapshot(decompose_impl(graph = g, mode = c("weak", "strong"))) }) test_that("neighborhood_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(neighborhood_impl( graph = g, @@ -11018,7 +10342,6 @@ test_that("neighborhood_impl basic", { test_that("neighborhood_size_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(neighborhood_size_impl( graph = g, @@ -11032,7 +10355,6 @@ test_that("neighborhood_size_impl basic", { test_that("is_chordal_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # Test with a chordal graph (complete graph is chordal) g <- make_full_graph(4) # alpha and alpham1 parameters must be provided as vectors matching vertex count @@ -11058,7 +10380,6 @@ test_that("is_chordal_impl basic", { test_that("get_adjacency_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(3) expect_snapshot(get_adjacency_impl( graph = g, @@ -11070,7 +10391,6 @@ test_that("get_adjacency_impl basic", { test_that("write_graph_edgelist_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(3) tmp <- tempfile() write_graph_edgelist_impl(graph = g, outstream = tmp) @@ -11081,7 +10401,6 @@ test_that("write_graph_edgelist_impl basic", { test_that("read_graph_edgelist_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) tmp <- tempfile() writeLines(c("0 1", "1 2", "2 0"), tmp) expect_snapshot(read_graph_edgelist_impl( @@ -11096,7 +10415,6 @@ test_that("read_graph_edgelist_impl basic", { test_that("compare_communities_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) comm1 <- c(1, 1, 2, 2, 3, 3) comm2 <- c(1, 1, 2, 2, 2, 3) expect_snapshot(compare_communities_impl( @@ -11110,7 +10428,6 @@ test_that("compare_communities_impl basic", { test_that("degree_sequence_game_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot(degree_sequence_game_impl( out_deg = c(2, 2, 2, 2), method = "configuration" @@ -11123,7 +10440,6 @@ test_that("degree_sequence_game_impl basic", { test_that("connect_neighborhood_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot_igraph(connect_neighborhood_impl( graph = g, @@ -11136,7 +10452,6 @@ test_that("connect_neighborhood_impl basic", { test_that("eccentricity_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(eccentricity_impl( graph = g, @@ -11147,21 +10462,18 @@ test_that("eccentricity_impl basic", { test_that("radius_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(radius_impl(graph = g, mode = c("out", "in", "all"))) }) test_that("graph_center_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_star(5, mode = "undirected") expect_snapshot(graph_center_impl(graph = g, mode = c("out", "in", "all"))) }) test_that("voronoi_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(10) expect_snapshot(voronoi_impl( graph = g, @@ -11174,7 +10486,6 @@ test_that("voronoi_impl basic", { test_that("spanner_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(spanner_impl(graph = g, stretch = 2)) }) @@ -11183,7 +10494,6 @@ test_that("spanner_impl basic", { test_that("edge_betweenness_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_star(5, mode = "undirected") expect_snapshot(edge_betweenness_impl(graph = g, directed = FALSE)) }) @@ -11192,14 +10502,12 @@ test_that("edge_betweenness_impl basic", { test_that("maximal_cliques_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(4) expect_snapshot(maximal_cliques_impl(graph = g, min_size = 1, max_size = 0)) }) test_that("independent_vertex_sets_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(5) expect_snapshot(independent_vertex_sets_impl( graph = g, @@ -11214,7 +10522,6 @@ test_that("independent_vertex_sets_impl basic", { test_that("bfs_closure_impl works", { withr::local_seed(20250125) - local_igraph_options(print.id = FALSE) g <- make_ring(10) @@ -11288,7 +10595,6 @@ test_that("bfs_closure_impl works", { test_that("dfs_closure_impl works", { withr::local_seed(20250125) - local_igraph_options(print.id = FALSE) g <- make_ring(10) @@ -11330,7 +10636,6 @@ test_that("dfs_closure_impl works", { test_that("motifs_randesu_callback_closure_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(~ A - B - C - A) @@ -11368,7 +10673,6 @@ test_that("motifs_randesu_callback_closure_impl basic", { test_that("motifs_randesu_callback_closure_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_graph(~ A - B - C) @@ -11387,7 +10691,6 @@ test_that("motifs_randesu_callback_closure_impl errors", { test_that("cliques_callback_closure_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(4) @@ -11421,7 +10724,6 @@ test_that("cliques_callback_closure_impl basic", { test_that("cliques_callback_closure_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(4) @@ -11440,7 +10742,6 @@ test_that("cliques_callback_closure_impl errors", { test_that("maximal_cliques_callback_closure_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- sample_gnp(10, 0.3) @@ -11477,7 +10778,6 @@ test_that("maximal_cliques_callback_closure_impl basic", { test_that("maximal_cliques_callback_closure_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_full_graph(4) @@ -11496,7 +10796,6 @@ test_that("maximal_cliques_callback_closure_impl errors", { test_that("simple_cycles_callback_closure_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(4, directed = TRUE) @@ -11534,7 +10833,6 @@ test_that("simple_cycles_callback_closure_impl basic", { test_that("simple_cycles_callback_closure_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- make_ring(4, directed = TRUE) @@ -11554,7 +10852,6 @@ test_that("simple_cycles_callback_closure_impl errors", { test_that("get_isomorphisms_vf2_callback_closure_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- make_ring(5) g2 <- make_ring(5) @@ -11599,7 +10896,6 @@ test_that("get_isomorphisms_vf2_callback_closure_impl basic", { test_that("get_isomorphisms_vf2_callback_closure_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- make_ring(5) g2 <- make_ring(5) @@ -11622,7 +10918,6 @@ test_that("get_isomorphisms_vf2_callback_closure_impl errors", { test_that("get_subisomorphisms_vf2_callback_closure_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- make_full_graph(5) g2 <- make_ring(3) # triangle @@ -11667,7 +10962,6 @@ test_that("get_subisomorphisms_vf2_callback_closure_impl basic", { test_that("get_subisomorphisms_vf2_callback_closure_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- make_ring(3) g2 <- make_full_graph(5) @@ -11691,7 +10985,6 @@ test_that("get_subisomorphisms_vf2_callback_closure_impl errors", { test_that("sparse_adjacency_impl basic", { skip_if_not_installed("Matrix") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # Create a simple sparse matrix M <- Matrix::sparseMatrix( @@ -11736,7 +11029,6 @@ test_that("sparse_adjacency_impl errors", { skip_if_not_installed("Matrix") skip_if_not(getRversion() >= "4.2") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # Regular matrices are converted to sparse matrices automatically # This should work, not error @@ -11749,7 +11041,6 @@ test_that("sparse_adjacency_impl errors", { test_that("sparse_weighted_adjacency_impl basic", { skip_if_not_installed("Matrix") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # Create a weighted sparse matrix M <- Matrix::sparseMatrix( @@ -11790,7 +11081,6 @@ test_that("sparse_weighted_adjacency_impl errors", { skip_if_not_installed("Matrix") skip_if_not(getRversion() >= "4.2") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # Regular matrices are converted to sparse matrices automatically # This should work, not error @@ -11804,7 +11094,6 @@ test_that("sparse_weighted_adjacency_impl errors", { test_that("weighted_sparsemat_impl basic", { skip_if_not_installed("Matrix") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # Create a weighted sparse matrix M <- Matrix::sparseMatrix( @@ -11839,7 +11128,6 @@ test_that("weighted_sparsemat_impl errors", { skip_if_not_installed("Matrix") skip_if_not(getRversion() >= "4.2") withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # Regular matrices are converted to sparse matrices automatically # This should work, not error @@ -11856,7 +11144,6 @@ test_that("weighted_sparsemat_impl errors", { test_that("disjoint_union_many_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- empty_impl(n = 2) g2 <- empty_impl(n = 3) g3 <- empty_impl(n = 1) @@ -11875,7 +11162,6 @@ test_that("disjoint_union_many_impl basic", { test_that("union_many_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- empty_impl(n = 3) g2 <- add_edges_impl(g1, c(0, 1, 1, 2) + 1) g3 <- add_edges_impl(g1, c(0, 2) + 1) @@ -11894,7 +11180,6 @@ test_that("union_many_impl basic", { test_that("intersection_many_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- add_edges_impl(empty_impl(n = 3), c(0, 1, 1, 2, 0, 2) + 1) g2 <- add_edges_impl(empty_impl(n = 3), c(0, 1, 1, 2) + 1) g3 <- add_edges_impl(empty_impl(n = 3), c(0, 1) + 1) @@ -11913,7 +11198,6 @@ test_that("intersection_many_impl basic", { test_that("layout_merge_dla_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g1 <- path_graph_impl(n = 3) g2 <- path_graph_impl(n = 3) coords1 <- matrix(c(0, 0, 1, 0, 2, 0), ncol = 2, byrow = TRUE) @@ -11937,7 +11221,6 @@ test_that("layout_merge_dla_impl basic", { # get_eid_impl test_that("get_eid_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- add_edges_impl(empty_impl(n = 5), c(0, 1, 1, 2, 2, 3, 3, 4) + 1) expect_snapshot(get_eid_impl( @@ -11973,7 +11256,6 @@ test_that("get_eid_impl basic", { test_that("get_eid_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- add_edges_impl(empty_impl(n = 3), c(0, 1, 1, 2) + 1) expect_snapshot_igraph_error(get_eid_impl( @@ -11999,7 +11281,6 @@ test_that("get_eid_impl errors", { # community_voronoi_impl test_that("community_voronoi_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- add_edges_impl( empty_impl(n = 10), c(0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9) + 1 @@ -12022,7 +11303,6 @@ test_that("community_voronoi_impl basic", { test_that("community_voronoi_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error(community_voronoi_impl( graph = NULL @@ -12032,7 +11312,6 @@ test_that("community_voronoi_impl errors", { # subisomorphic_lad_impl test_that("subisomorphic_lad_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # FIXME: Add functionality tests once we understand the expected behavior # The function requires complex setup with pattern/target graphs and domains @@ -12046,7 +11325,6 @@ test_that("subisomorphic_lad_impl basic", { test_that("subisomorphic_lad_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) g <- add_edges_impl(empty_impl(n = 3), c(0, 1, 1, 2) + 1) expect_snapshot_igraph_error(subisomorphic_lad_impl( @@ -12070,7 +11348,6 @@ test_that("subisomorphic_lad_impl errors", { # eigen_matrix_impl test_that("eigen_matrix_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # FIXME: Add functionality tests once we understand the expected behavior # The function requires complex matrix setup and understanding of eigenvalue computation @@ -12084,7 +11361,6 @@ test_that("eigen_matrix_impl basic", { test_that("eigen_matrix_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # Test with invalid matrix dimensions expect_error(eigen_matrix_impl( @@ -12100,7 +11376,6 @@ test_that("eigen_matrix_impl errors", { # eigen_matrix_symmetric_impl test_that("eigen_matrix_symmetric_impl basic", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # FIXME: Add functionality tests once we understand the expected behavior # The function requires complex matrix setup and understanding of eigenvalue computation @@ -12114,7 +11389,6 @@ test_that("eigen_matrix_symmetric_impl basic", { test_that("eigen_matrix_symmetric_impl errors", { withr::local_seed(20250909) - local_igraph_options(print.id = FALSE) # Test with invalid matrix dimensions expect_error(eigen_matrix_symmetric_impl( diff --git a/tests/testthat/test-adjacency.R b/tests/testthat/test-adjacency.R index 56ff4d3d2d1..809009faeab 100644 --- a/tests/testthat/test-adjacency.R +++ b/tests/testthat/test-adjacency.R @@ -646,7 +646,6 @@ test_that("graph_from_adjacency_matrix() works -- dgCMatrix", { test_that("graph_from_adjacency_matrix() snapshot", { rlang::local_options(lifecycle_verbosity = "warning") - local_igraph_options(print.id = FALSE) expect_false(igraph_opt("print.id")) expect_snapshot({ @@ -677,7 +676,6 @@ test_that("graph_from_adjacency_matrix() snapshot for sparse matrices", { rlang::local_options(lifecycle_verbosity = "warning") - local_igraph_options(print.id = FALSE) expect_false(igraph_opt("print.id")) expect_snapshot({ diff --git a/tests/testthat/test-conversion.R b/tests/testthat/test-conversion.R index a497f9e4f82..aa25f243b06 100644 --- a/tests/testthat/test-conversion.R +++ b/tests/testthat/test-conversion.R @@ -45,15 +45,11 @@ test_that("as_directed keeps attributes", { }) test_that("as.directed() deprecation", { - local_igraph_options(print.id = FALSE) - g <- sample_gnp(100, 2 / 100) expect_snapshot(is_directed(as.directed(g, mode = "mutual"))) }) test_that("as.undirected() deprecation", { - local_igraph_options(print.id = FALSE) - g <- sample_gnp(100, 2 / 100) expect_snapshot(is_directed(as.undirected(g, mode = "collapse"))) }) diff --git a/tests/testthat/test-foreign.R b/tests/testthat/test-foreign.R index 4f2af7560c7..b1542f0334f 100644 --- a/tests/testthat/test-foreign.R +++ b/tests/testthat/test-foreign.R @@ -27,8 +27,6 @@ test_that("reading GraphML file works", { }) test_that("reading graph in NCOL format", { - local_igraph_options(print.id = FALSE) - ncol_path <- withr::local_tempfile(pattern = "testfile", fileext = ".ncol") g <- make_graph(c(1, 2, 2, 3)) write_graph(g, ncol_path, "ncol") @@ -36,8 +34,6 @@ test_that("reading graph in NCOL format", { }) test_that("reading graph in LGL format", { - local_igraph_options(print.id = FALSE) - lgl_path <- withr::local_tempfile(pattern = "testfile", fileext = ".lgl") g <- make_graph(c(1, 2, 2, 3)) write_graph(g, lgl_path, "lgl") @@ -45,8 +41,6 @@ test_that("reading graph in LGL format", { }) test_that("reading graph, unused argument", { - local_igraph_options(print.id = FALSE) - lgl_path <- withr::local_tempfile(pattern = "testfile", fileext = ".lgl") g <- make_graph(c(1, 2, 2, 3)) write_graph(g, lgl_path, "lgl") diff --git a/tests/testthat/test-incidence.R b/tests/testthat/test-incidence.R index 68b5fb34d03..e479ae76dec 100644 --- a/tests/testthat/test-incidence.R +++ b/tests/testthat/test-incidence.R @@ -1,5 +1,4 @@ test_that("graph_from_biadjacency_matrix() works -- dense", { - local_igraph_options(print.id = FALSE) withr::local_seed(42) inc <- matrix(sample(0:1, 15, repl = TRUE), 3, 5) @@ -17,7 +16,6 @@ test_that("graph_from_biadjacency_matrix() works -- dense", { test_that("graph_from_biadjacency_matrix() works -- dense + multiple", { - local_igraph_options(print.id = FALSE) withr::local_seed(42) inc <- matrix(sample(0:2, 15, repl = TRUE), 3, 5) @@ -30,7 +28,6 @@ test_that("graph_from_biadjacency_matrix() works -- dense + multiple", { test_that("graph_from_biadjacency_matrix() works - dense, modes", { - local_igraph_options(print.id = FALSE) withr::local_seed(42) inc <- matrix(sample(0:1, 15, repl = TRUE), 3, 5) @@ -57,7 +54,6 @@ test_that("graph_from_biadjacency_matrix() works - dense, modes", { }) test_that("graph_from_biadjacency_matrix() works - dense, modes, weighted", { - local_igraph_options(print.id = FALSE) withr::local_seed(42) inc <- matrix(sample(0:2, 15, repl = TRUE), 3, 5) @@ -110,7 +106,6 @@ test_that("graph_from_biadjacency_matrix() works - dense, modes, weighted", { }) test_that("graph_from_biadjacency_matrix() works -- sparse", { - local_igraph_options(print.id = FALSE) withr::local_seed(42) inc <- matrix(sample(0:1, 15, repl = TRUE), 3, 5) @@ -128,7 +123,6 @@ test_that("graph_from_biadjacency_matrix() works -- sparse", { }) test_that("graph_from_biadjacency_matrix() works -- sparse + multiple", { - local_igraph_options(print.id = FALSE) withr::local_seed(42) inc <- matrix(sample(0:2, 15, repl = TRUE), 3, 5) @@ -141,7 +135,6 @@ test_that("graph_from_biadjacency_matrix() works -- sparse + multiple", { }) test_that("graph_from_biadjacency_matrix() works - sparse, modes", { - local_igraph_options(print.id = FALSE) withr::local_seed(42) inc <- matrix(sample(0:1, 15, repl = TRUE), 3, 5) @@ -169,7 +162,6 @@ test_that("graph_from_biadjacency_matrix() works - sparse, modes", { }) test_that("graph_from_biadjacency_matrix() works - sparse, modes, weighted", { - local_igraph_options(print.id = FALSE) withr::local_seed(42) inc <- matrix(sample(0:2, 15, repl = TRUE), 3, 5) diff --git a/tests/testthat/test-iterators.R b/tests/testthat/test-iterators.R index 4f1c792b084..a65fcf1b56f 100644 --- a/tests/testthat/test-iterators.R +++ b/tests/testthat/test-iterators.R @@ -325,8 +325,6 @@ test_that("both edge and vertex names", { }) test_that("printing connected vs/es works", { - local_igraph_options(print.id = FALSE) - g <- make_ring(10) vs <- V(g) es <- E(g) @@ -345,8 +343,6 @@ test_that("printing connected vs/es works", { }) test_that("printing named connected vs/es works", { - local_igraph_options(print.id = FALSE) - g <- make_ring(10) V(g)$name <- letters[1:10] vs <- V(g) @@ -366,8 +362,6 @@ test_that("printing named connected vs/es works", { }) test_that("printing unconnected vs/es works", { - local_igraph_options(print.id = FALSE) - g <- make_ring(10) vs <- V(g) es <- E(g) diff --git a/tests/testthat/test-make.R b/tests/testthat/test-make.R index 024f93b3c3e..245ee149e93 100644 --- a/tests/testthat/test-make.R +++ b/tests/testthat/test-make.R @@ -66,7 +66,6 @@ test_that("we pass arguments unevaluated", { }) test_that("graph_from_literal() and simple undirected graphs", { - local_igraph_options(print.id = FALSE) expect_snapshot({ graph_from_literal(A - B) graph_from_literal(A - B - C) @@ -75,7 +74,6 @@ test_that("graph_from_literal() and simple undirected graphs", { }) test_that("graph_from_literal() and undirected explosion", { - local_igraph_options(print.id = FALSE) expect_snapshot({ graph_from_literal(A:B:C - D:E, B:D - C:E) graph_from_literal(A:B:C - D:E - F:G:H - I - J:K:L:M) @@ -83,7 +81,6 @@ test_that("graph_from_literal() and undirected explosion", { }) test_that("graph_from_literal() and simple directed graphs", { - local_igraph_options(print.id = FALSE) expect_snapshot({ graph_from_literal(A -+ B) graph_from_literal(A -+ B -+ C) @@ -93,7 +90,6 @@ test_that("graph_from_literal() and simple directed graphs", { }) test_that("graph_from_literal() and directed explosion", { - local_igraph_options(print.id = FALSE) expect_snapshot({ graph_from_literal(A:B:C -+ D:E, B:D +- C:E) graph_from_literal(A:B:C -+ D:E +- F:G:H -+ I +- J:K:L:M) @@ -101,7 +97,6 @@ test_that("graph_from_literal() and directed explosion", { }) test_that("graph_from_literal(simplify = FALSE)", { - local_igraph_options(print.id = FALSE) expect_snapshot({ graph_from_literal(1 - 1, 1 - 2, 1 - 2) graph_from_literal(1 - 1, 1 - 2, 1 - 2, simplify = FALSE) diff --git a/tests/testthat/test-other.R b/tests/testthat/test-other.R index 533835127ee..466cb539e5f 100644 --- a/tests/testthat/test-other.R +++ b/tests/testthat/test-other.R @@ -49,8 +49,6 @@ test_that("R help contains guarantee on number of RNG bits", { }) test_that("serialization works", { - local_igraph_options(print.id = FALSE) - g <- make_ring(3, directed = TRUE) gs <- unserialize(serialize(g, NULL)) diff --git a/tests/testthat/test-print.R b/tests/testthat/test-print-classic.R similarity index 96% rename from tests/testthat/test-print.R rename to tests/testthat/test-print-classic.R index 940b857af20..5a849f282c7 100644 --- a/tests/testthat/test-print.R +++ b/tests/testthat/test-print-classic.R @@ -129,8 +129,6 @@ test_that("print.igraph() respects max.print in the adjlist wrapping branch", { }) test_that("print.igraph.es() uses vertex names", { - local_igraph_options(print.id = FALSE) - g <- make_directed_graph(c("A", "B")) expect_snapshot({ E(g) @@ -139,8 +137,6 @@ test_that("print.igraph.es() uses vertex names", { test_that("vs printing", { - local_igraph_options(print.id = FALSE) - local_rng_version("3.5.0") withr::local_seed(42) g <- make_graph(~ A - A:B:C, B - A:B:C) %>% @@ -156,8 +152,6 @@ test_that("vs printing", { }) test_that("vs printing, complex attributes", { - local_igraph_options(print.id = FALSE) - local_rng_version("3.5.0") withr::local_seed(42) g <- make_graph(~ A - A:B:C, B - A:B:C) %>% @@ -172,8 +166,6 @@ test_that("vs printing, complex attributes", { }) test_that("es printing", { - local_igraph_options(print.id = FALSE) - local_rng_version("3.5.0") withr::local_seed(42) g <- make_graph(~ A - A:B:C, B - A:B:C) %>% @@ -187,8 +179,6 @@ test_that("es printing", { }) test_that("es printing, complex attributes", { - local_igraph_options(print.id = FALSE) - local_rng_version("3.5.0") withr::local_seed(42) g <- make_graph(~ A - A:B:C, B - A:B:C) %>% diff --git a/tests/testthat/test-print-cli.R b/tests/testthat/test-print-cli.R new file mode 100644 index 00000000000..8a22b526c29 --- /dev/null +++ b/tests/testthat/test-print-cli.R @@ -0,0 +1,99 @@ +test_that("cli print.igraph: undirected unnamed ring", { + local_igraph_options(print.style = "cli") + withr::local_options(cli.num_colors = 1, cli.unicode = TRUE, cli.width = 80) + g <- make_ring(5) + expect_snapshot(print(g)) + expect_snapshot(summary(g)) +}) + +test_that("cli print.igraph: directed named weighted", { + local_igraph_options(print.style = "cli") + withr::local_options(cli.num_colors = 1, cli.unicode = TRUE, cli.width = 80) + g <- make_ring(3, directed = TRUE) |> + set_vertex_attr("name", value = c("A", "B", "C")) |> + set_edge_attr("weight", value = 1:3) |> + set_graph_attr("name", value = "trio") + expect_snapshot(print(g)) + expect_snapshot(summary(g)) +}) + +test_that("cli print.igraph: bipartite", { + local_igraph_options(print.style = "cli") + withr::local_options(cli.num_colors = 1, cli.unicode = TRUE, cli.width = 80) + g <- make_bipartite_graph( + types = c(FALSE, FALSE, TRUE, TRUE), + edges = c(1, 3, 2, 4) + ) + expect_snapshot(print(g)) +}) + +test_that("cli print.igraph: empty graph has no edges section", { + local_igraph_options(print.style = "cli") + withr::local_options(cli.num_colors = 1, cli.unicode = TRUE, cli.width = 80) + expect_snapshot(print(make_empty_graph(0))) + expect_snapshot(print(make_empty_graph(3, directed = FALSE))) +}) + +test_that("cli print.igraph: full mode with all attribute sections", { + local_igraph_options( + print.style = "cli", + print.full = TRUE, + print.graph.attributes = TRUE, + print.vertex.attributes = TRUE, + print.edge.attributes = TRUE + ) + withr::local_options(cli.num_colors = 1, cli.unicode = TRUE, cli.width = 80) + g <- make_ring(3, directed = TRUE) |> + set_vertex_attr("name", value = c("A", "B", "C")) |> + set_edge_attr("weight", value = 1:3) |> + set_graph_attr("name", value = "trio") + expect_snapshot(print(g)) +}) + +test_that("cli print.igraph.vs: single and double bracket", { + local_igraph_options(print.style = "cli") + withr::local_options(cli.num_colors = 1, cli.unicode = TRUE, cli.width = 80) + g <- make_ring(3) |> + set_vertex_attr("name", value = c("A", "B", "C")) |> + set_vertex_attr("weight", value = 10:12) + expect_snapshot({ + V(g) + V(g)[1:2] + V(g)[[1]] + V(g)[[2:3]] + }) +}) + +test_that("cli print.igraph.es: single and double bracket", { + local_igraph_options(print.style = "cli") + withr::local_options(cli.num_colors = 1, cli.unicode = TRUE, cli.width = 80) + g <- make_ring(3, directed = TRUE) |> + set_vertex_attr("name", value = c("A", "B", "C")) |> + set_edge_attr("weight", value = 1:3) + expect_snapshot({ + E(g) + E(g)[1:2] + E(g)[[1]] + E(g)[[2:3]] + }) +}) + +test_that("cli print.igraph: ASCII fallback when cli.unicode = FALSE", { + local_igraph_options(print.style = "cli") + withr::local_options(cli.num_colors = 1, cli.unicode = FALSE, cli.width = 80) + g <- make_ring(3, directed = TRUE) |> + set_vertex_attr("name", value = c("A", "B", "C")) + expect_snapshot(print(g)) + expect_snapshot(V(g)) + expect_snapshot(E(g)) +}) + +test_that("cli print.igraph: truncation in auto mode", { + local_igraph_options( + print.style = "cli", + auto.print.lines = 3 + ) + withr::local_options(cli.num_colors = 1, cli.unicode = TRUE, cli.width = 80) + g <- make_ring(200) + expect_snapshot(print(g)) +}) diff --git a/tests/testthat/test-structural-properties.R b/tests/testthat/test-structural-properties.R index 0e93e26f3ed..e418a16fa46 100644 --- a/tests/testthat/test-structural-properties.R +++ b/tests/testthat/test-structural-properties.R @@ -214,8 +214,6 @@ test_that("BFS callback does not blow up when another igraph function is raised }) test_that("bfs() works", { - local_igraph_options(print.id = FALSE) - expect_snapshot({ g <- graph_from_literal(a -+ b -+ c, z -+ a, d) bfs( diff --git a/tests/testthat/test-trees.R b/tests/testthat/test-trees.R index e5a1b59bf33..862481d2b34 100644 --- a/tests/testthat/test-trees.R +++ b/tests/testthat/test-trees.R @@ -216,7 +216,6 @@ test_that("sample_spanning_tree works for disconnected graphs", { }) test_that("subgraph.edges deprecation", { - local_igraph_options(print.id = FALSE) withr::local_seed(42) g <- make_full_graph(8) %du% make_full_graph(5) diff --git a/tests/testthat/test-versions.R b/tests/testthat/test-versions.R index 0af0633de57..35aee66b849 100644 --- a/tests/testthat/test-versions.R +++ b/tests/testthat/test-versions.R @@ -67,8 +67,6 @@ test_that("we can upgrade from 0.6 to 1.5.0, explicitly", { }) test_that("we can upgrade from 1.0.0 to 1.5.0, on the fly", { - local_igraph_options(print.id = FALSE) - expect_snapshot({ g <- oldsample_1_0_0() graph_version(g) @@ -92,8 +90,6 @@ test_that("we can upgrade from 1.0.0 to 1.5.0, explicitly", { }) test_that("reading of old igraph formats", { - local_igraph_options(print.id = FALSE) - s <- oldsamples() expect_snapshot_igraph_error({ s[["0.1.1"]]