tests/testthat/test-handler.R

test_that("can create graphs when igraph is not attached", {
  g <- callr::r(function() { igraph::make_ring(3, directed = TRUE) })
  g2 <- make_ring(3, directed = TRUE)
  expect_identical(
    unclass(g)[-igraph_t_idx_env],
    unclass(g2)[-igraph_t_idx_env]
  )
})

Try the igraph package in your browser

Any scripts or data that you put into this service are public.

igraph documentation built on Aug. 10, 2023, 9:08 a.m.