Skip to content

Commit

Permalink
Switched from all.equal to expect_equal
Browse files Browse the repository at this point in the history
  • Loading branch information
nilseling committed Dec 13, 2023
1 parent fc75f61 commit 32365f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test_binAcrossPixels.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test_that("binAcrossPixels function works.", {
dimnames(test2) <- NULL
dimnames(test) <- NULL

all.equal(test2, test)
expect_equal(test2, test)

expect_silent(out <- binAcrossPixels(cur_sce, bin_size = 10, statistic = "mean"))

Expand All @@ -46,7 +46,7 @@ test_that("binAcrossPixels function works.", {
dimnames(test2) <- NULL
dimnames(test) <- NULL

all.equal(test2, test)
expect_equal(test2, test)

# Works
expect_silent(out <- binAcrossPixels(cur_sce, bin_size = 2))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_findBorderCells.R
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,6 @@ test_that("findBorderCells function works if cells are not ordered by image", {
expect_silent(sce2 <- findBorderCells(sce2, img_id = "ImageNb", border_dist = 10))
plotSpatial(sce2, img_id = "ImageNb", node_color_by = "border_cells")

all.equal(pancreasSCE$border_cells, sce2[,colnames(pancreasSCE)]$border_cells)
expect_equal(pancreasSCE$border_cells, sce2[,colnames(pancreasSCE)]$border_cells)

})

0 comments on commit 32365f3

Please sign in to comment.