Skip to content

Commit

Permalink
allow QFeatures or se/sce
Browse files Browse the repository at this point in the history
  • Loading branch information
lgatto committed Feb 22, 2025
1 parent 0b5ccd7 commit 291399e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/testthat/test-datasets.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Ensure resources are present

## code taken from
## code taken from
## https://github.com/waldronlab/curatedTCGAData/blob/master/tests/testthat/test-resources.R

test_that("metadata numbers match ExperimentHub", {
metaf <- system.file("extdata", "metadata.csv",
metaf <- system.file("extdata", "metadata.csv",
package = "scpdata", mustWork = TRUE)
meta <- read.csv(metaf, stringsAsFactors = FALSE)
EHub <- query(ExperimentHub(), "scpdata")
Expand All @@ -13,7 +13,7 @@ test_that("metadata numbers match ExperimentHub", {
})

test_that("scpdata", {
metaf <- system.file("extdata", "metadata.csv",
metaf <- system.file("extdata", "metadata.csv",
package = "scpdata", mustWork = TRUE)
meta <- read.csv(metaf, stringsAsFactors = FALSE)
res <- scpdata()
Expand All @@ -24,12 +24,11 @@ test_that("all datasets are available", {
res <- scpdata()
for (dataset in res$title) {
ds <- eval(call(dataset))
expect_true(is(ds, "QFeatures"))
expect_true(is(ds, "QFeatures") | inherits(ds, "SummarizedExperiment"))
}
})

test_that("leduc2022 throws a warning", {
test <- expect_warning(leduc2022())
expect_identical(length(test), 138L)
})

})

0 comments on commit 291399e

Please sign in to comment.