swh:1:snp:0c004a03453a29b80f921a24433f7e780b9ceb53
Tip revision: c6bb0e960554a23eb712690cbd7f8e3f7d79ca0d authored by Alexey Sergushichev on 02 July 2021, 13:19:49 UTC
Update js
Update js
Tip revision: c6bb0e9
testloadPreloaded.R
context("Load preloaded datasets")
library(Biobase)
test_that("loadPreloaded throws errors correctly", {
expect_error(loadPreloaded("aa"), regexp = "Specify the directory")
options(phantasusPreloadedDir = "falseDirectory")
expect_error(loadPreloaded("aa"), regexp = "No such directory")
options(phantasusPreloadedDir = system.file("testdata", package="phantasus"))
expect_error(loadPreloaded("falseFile"), regexp = "No such dataset")
expect_error(loadPreloaded("wrongFormatFile"), regexp = "Wrong format")
expect_error(loadPreloaded("wrapped_wrongFormat"), regexp = "Wrong format")
options(phantasusPreloadedDir = NULL)
})
test_that("loadPreloaded loads file with just one ExpressionSet", {
options(phantasusPreloadedDir = system.file("testdata", package="phantasus"))
expect_is(loadPreloaded("aa"), "json")
options(phantasusPreloadedDir = NULL)
})