Skip to content

Commit

Permalink
add test using RDS method
Browse files Browse the repository at this point in the history
  • Loading branch information
josschavezf committed Sep 25, 2024
1 parent 72027b4 commit 9676ca2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/testthat/test-save_load.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,20 @@ test_that("gobject an be ovewritten and loaded - qs", {

expect_true(methods::validObject(g3))
})

test_that("gobject can be saved and loaded - RDS", {
rlang::local_options(lifecycle_verbosity = "quiet")
saveGiotto(g, dir = test, overwrite = TRUE, verbose = FALSE)
g2 <<- loadGiotto(file.path(test, "saveGiottoDir"))

expect_true(methods::validObject(g2))
})

test_that("gobject an be ovewritten and loaded - RDS", {
rlang::local_options(lifecycle_verbosity = "quiet")
saveGiotto(g2, dir = test, overwrite = TRUE, verbose = FALSE)
g3 <- loadGiotto(file.path(test, "saveGiottoDir"))

expect_true(methods::validObject(g3))
})

0 comments on commit 9676ca2

Please sign in to comment.