Skip to content

Commit

Permalink
Enhancement for #145. Test commit
Browse files Browse the repository at this point in the history
test(network): added test for ensure that numerical output of `network()` remains stable irrespective of `plot.graph` parameter
  • Loading branch information
Max-Bladen committed Apr 3, 2022
1 parent 8e09a5d commit b4ac34a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/testthat/test-network.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,17 @@ test_that("network works for spls", {
})

unlink(list.files(pattern = "*.pdf"))


test_that("network plot.graph parameter does not affect numerical output", {
data("nutrimouse")
X <- nutrimouse$gene
Y <- nutrimouse$lipid

pls.obj <- pls(X, Y)

network.obj.F <- network(pls.obj, plot.graph = F)
network.obj.T <- network(pls.obj, plot.graph = T)

expect_equal(network.obj.F$M, network.obj.T$M)
})

0 comments on commit b4ac34a

Please sign in to comment.