swh:1:snp:0c004a03453a29b80f921a24433f7e780b9ceb53
Tip revision: 86a00a4283730af08ece8128e9cc940845d0222d authored by Nitesh Turaga on 02 May 2019, 15:54:11 UTC
bump x.y.z versions to even y prior to creation of RELEASE_3_9 branch
bump x.y.z versions to even y prior to creation of RELEASE_3_9 branch
Tip revision: 86a00a4
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)
})