Skip to content

Commit dd9f2b5

Browse files
committed
Tweak
1 parent 6899694 commit dd9f2b5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/testthat/test-read_graph.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ test_that("reading GraphML file works", {
88
})
99

1010
test_that("reading graph in ncol format", {
11-
library(igraph)
11+
ncol_path <- tempfile("zoo", fileext = ".ncol")
1212
g <- make_graph(c(1, 2, 2, 3))
1313
write_graph(g, "zoo.ncol", "ncol")
14-
expect_no_error(g2 <- read_graph("zoo.ncol", "ncol"))
14+
expect_no_error(g2 <- read_graph(ncol_path, "ncol"))
1515
})
1616

1717
test_that("reading graph in lgl format", {
18-
library(igraph)
18+
ncol_path <- tempfile("zoo", fileext = ".ncol")
1919
g <- make_graph(c(1, 2, 2, 3))
2020
write_graph(g, "zoo.lgl", "lgl")
21-
expect_no_error(g2 <- read_graph("zoo.lgl", "lgl"))
21+
expect_no_error(g2 <- read_graph(ncol_path, "lgl"))
2222
})

0 commit comments

Comments
 (0)