Skip to content

Commit a1b8da1

Browse files
committed
Relax tests for loss of precision when reading floats from text.
1 parent cb68415 commit a1b8da1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: DropletUtils
2-
Version: 1.29.2
3-
Date: 2025-06-12
2+
Version: 1.29.3
3+
Date: 2025-06-13
44
Title: Utilities for Handling Single-Cell Droplet Data
55
Authors@R: c(
66
person("Aaron", "Lun", role = "aut"),

tests/testthat/test-read10x.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test_that("read10xCounts works correctly for sparse counts, version < 3", {
5151
write10xCounts(path=tmpdir2, my.counts*2, gene.id=gene.ids, gene.symbol=gene.symb, barcodes=cell.ids)
5252

5353
sce10x2 <- read10xCounts(tmpdir2)
54-
expect_identical(assay(sce10x)*2, assay(sce10x2))
54+
expect_equal(assay(sce10x)*2L, assay(sce10x2))
5555

5656
ref <- cbind(sce10x, sce10x2)
5757
colnames(ref) <- NULL
@@ -115,7 +115,7 @@ test_that("read10xCounts works for sparse counts with odd inputs", {
115115
write10xCounts(path=tmpdir, my.counts, gene.id=gene.ids, gene.symbol=gene.symb2, barcodes=cell.ids)
116116
sce10x <- read10xCounts(tmpdir)
117117

118-
expect_identical(assay(sce10x, withDimnames=FALSE), my.counts)
118+
expect_equal(assay(sce10x, withDimnames=FALSE), my.counts)
119119
expect_identical(colData(sce10x)$Barcode, cell.ids)
120120
expect_identical(rowData(sce10x)$ID, gene.ids)
121121
expect_identical(rowData(sce10x)$Symbol, gene.symb2)
@@ -143,7 +143,7 @@ test_that("read10xCounts works correctly for sparse counts, version >= 3", {
143143
sce10delayed <- read10xCounts(c(tmpdir, tmpdir), delayed=TRUE)
144144
expect_s4_class(counts(sce10delayed), "DelayedMatrix")
145145
converted <- as(counts(sce10delayed), "CsparseMatrix")
146-
expect_identical(converted, cbind(alt.counts, alt.counts))
146+
expect_equal(converted, cbind(alt.counts, alt.counts))
147147
})
148148

149149
test_that("read10xCounts works correctly for zipped files", {
@@ -244,7 +244,7 @@ test_that("read10xCounts works correctly with mismatching features", {
244244
# Intersection works as expected.
245245
sce10x <- read10xCounts(c(tmpdir1, tmpdir2), intersect.genes=TRUE)
246246
expect_identical(rownames(sce10x), gene.ids[keep])
247-
expect_identical(assay(sce10x, withDimnames=FALSE), cbind(my.counts[keep,], my.counts[keep,]))
247+
expect_equal(assay(sce10x, withDimnames=FALSE), cbind(my.counts[keep,], my.counts[keep,]))
248248
})
249249

250250
test_that("read10xCounts, use gene symbols as row names", {

0 commit comments

Comments
 (0)