Skip to content

Commit d2c49ac

Browse files
committed
More tests
1 parent c3c7e1e commit d2c49ac

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/testthat/test-utilities.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,18 @@ test_that("get_count_datasets works", {
285285
rownames(se1) <- paste0("G", c(1, 2, 1))
286286
expect_error(cds <- get_count_datasets(se1), "some row names are duplicated")
287287

288+
# All dimnames are NULL - not duplicated
289+
se1 <- se
290+
rownames(se1) <- colnames(se1) <- NULL
291+
rownames(assay(se1, "mat1", withDimnames = FALSE)) <-
292+
colnames(assay(se1, "mat1", withDimnames = FALSE)) <-
293+
rownames(assay(se1, "mat2", withDimnames = FALSE)) <-
294+
colnames(assay(se1, "mat2", withDimnames = FALSE)) <-
295+
rownames(assay(se1, "mat3", withDimnames = FALSE)) <-
296+
colnames(assay(se1, "mat3", withDimnames = FALSE)) <- NULL
297+
expect_false(check_if_any_dimnames_duplicated(se1, dim = "cols"))
298+
expect_false(check_if_any_dimnames_duplicated(se1, dim = "rows"))
299+
288300
# Unnamed assay(s)
289301
# se1 <- SummarizedExperiment::SummarizedExperiment(
290302
# assays = list(

0 commit comments

Comments
 (0)