Skip to content

Commit

Permalink
Merge pull request #261 from tidymodels/stricter-sparsevctrs-recompos…
Browse files Browse the repository at this point in the history
…e-tests

stricter recompose sparsevctrs tests
  • Loading branch information
EmilHvitfeldt authored Sep 17, 2024
2 parents 962c789 + d79f032 commit 5a33a02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/testthat/test-recompose.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ test_that("validates `composition`", {

test_that("sparse tibble can be turned to tibble", {
skip_if_not_installed("modeldata")
withr::local_options("sparsevctrs.verbose_materialize" = 3)

hotel_data <- sparse_hotel_rates()
hotel_data <- sparsevctrs::coerce_to_sparse_tibble(hotel_data)
Expand All @@ -91,6 +92,7 @@ test_that("sparse tibble can be turned to tibble", {

test_that("sparse tibble can be turned to data.frame", {
skip_if_not_installed("modeldata")
withr::local_options("sparsevctrs.verbose_materialize" = 3)

hotel_data <- sparse_hotel_rates()
hotel_data <- sparsevctrs::coerce_to_sparse_tibble(hotel_data)
Expand Down Expand Up @@ -122,6 +124,7 @@ test_that("sparse tibble can be turned to matrix", {

test_that("sparse tibble can be turned to dgCMatrix", {
skip_if_not_installed("modeldata")
withr::local_options("sparsevctrs.verbose_materialize" = 3)

hotel_mat <- sparse_hotel_rates()
hotel_data <- sparsevctrs::coerce_to_sparse_tibble(hotel_mat)
Expand Down

0 comments on commit 5a33a02

Please sign in to comment.