Skip to content

Commit

Permalink
added one more test to increase R code coverage for sparse matrices (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS committed Nov 24, 2019
1 parent 7eba2e5 commit 44b3654
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions R-package/tests/testthat/test-RGF_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,16 @@ testthat::test_that("the methods of the 'FastRGF_Classifier' class return the co
# conversion of an R matrix to a scipy sparse matrix
#---------------------------------------------------

testthat::test_that("the 'mat_2scipy_sparse' returns an error in case that the data is not inheriting matrix class", {

skip_test_if_no_module("scipy")

x_rgf_invalid = as.data.frame(x_rgf)

testthat::expect_error( mat_2scipy_sparse(x_rgf_invalid) )
})


testthat::test_that("the 'mat_2scipy_sparse' returns an error in case that the 'format' parameter is invalid", {

skip_test_if_no_module("scipy")
Expand Down

0 comments on commit 44b3654

Please sign in to comment.