Skip to content

Commit

Permalink
Remove superfluous network-simplifications in tests
Browse files Browse the repository at this point in the history
As these networks are already simplified, further simplifications
are not necessary and might even lead to unexpected effects.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
  • Loading branch information
maxloeffler committed Apr 12, 2024
1 parent 65b422c commit 666d784
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test-networks.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ test_that("Simplify basic multi-relational network", {

## simplify network with simplifying multiple relations into single edges
network.simplified = simplify.network(network, simplify.multiple.relations = TRUE)
expect_identical(igraph::ecount(simplify.network(network.simplified)), 1)
expect_identical(igraph::ecount(network.simplified), 1)
expect_identical(igraph::E(network.simplified)$type[[1]], "Unipartite")
expect_identical(igraph::E(network.simplified)$relation[[1]], c("cochange", "mail"))
})
Expand Down Expand Up @@ -265,7 +265,7 @@ test_that("Simplify multiple basic multi-relational networks", {
expect_true(length(networks.simplified) == 2)
expect_identical(names(networks.simplified), names(networks))
for (i in 1:2) {
expect_identical(igraph::ecount(simplify.network(networks.simplified[[i]])), 1)
expect_identical(igraph::ecount(networks.simplified[[i]]), 1)
expect_identical(igraph::E(networks.simplified[[i]])$type[[1]], "Unipartite")
expect_identical(igraph::E(networks.simplified[[i]])$relation[[1]], c("cochange", "mail"))
}
Expand Down

0 comments on commit 666d784

Please sign in to comment.