Skip to content

Commit

Permalink
Safeguard suggested {intergraph} package in tests (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke authored Feb 12, 2024
1 parent a635e2d commit 85a4944
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-ggnet.R
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ test_that("examples", {
expect_error(ggnet(network(data.frame(1:2, 3:4), multiple = TRUE)), "multiplex graphs")

### --- test igraph functionality
if (rq(igraph)) {
if (rq(igraph) && rq(intergraph)) {
# test igraph conversion
p <- ggnet(asIgraph(n))
expect_null(p$guides$colour)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-ggnet2.R
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ test_that("examples", {
expect_error(ggnet2(network(data.frame(1:2, 3:4), multiple = TRUE)), "multiplex graphs")

### --- test igraph functionality
if (rq(igraph)) {
if (rq(igraph) && rq(intergraph)) {
# test igraph conversion
p <- ggnet2(asIgraph(n), color = "group")
expect_null(p$guides$colour)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-ggnetworkmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ test_that("network coercion", {
### --- test igraph functionality

test_that("igraph conversion", {
if (rq(igraph)) {
if (rq(igraph) && rq(intergraph)) {
n <- asIgraph(flights)
p <- ggnetworkmap(net = n)
expect_equal(length(p$layers), 2)
Expand Down

0 comments on commit 85a4944

Please sign in to comment.