Skip to content

Commit

Permalink
Warnings in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdamoses committed Jul 14, 2023
1 parent ab26222 commit 09578e3
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 7,010 deletions.
2 changes: 1 addition & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ getDivergeRange <- function(values, diverge_center = 0) {
.dark_theme <- function() {
# From Seurat but no axes
black.background <- element_rect(fill = 'black')
black.background.no.border <- element_rect(fill = 'black', size = 0)
black.background.no.border <- element_rect(fill = 'black', linewidth = 0)
font.margin <- 4
white.text <- element_text(
colour = 'white',
Expand Down
2,657 changes: 0 additions & 2,657 deletions tests/testthat/_snaps/plot/coldata-bin2d-for-multiple-samples.svg

This file was deleted.

1,792 changes: 0 additions & 1,792 deletions tests/testthat/_snaps/plot/coldata-bin2d-with-hexbin.svg

This file was deleted.

1,615 changes: 0 additions & 1,615 deletions tests/testthat/_snaps/plot/coldata-bin2d.svg

This file was deleted.

This file was deleted.

315 changes: 0 additions & 315 deletions tests/testthat/_snaps/plot/rowdata-bin2d-with-subset.svg

This file was deleted.

287 changes: 0 additions & 287 deletions tests/testthat/_snaps/plot/rowdata-bin2d.svg

This file was deleted.

28 changes: 0 additions & 28 deletions tests/testthat/test-plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -557,34 +557,6 @@ sfe_cosmx2 <- SpatialFeatureExperiment::cbind(sfe_cosmx2a, sfe_cosmx2b)
sfe_cosmx2 <- removeEmptySpace(sfe_cosmx2)

test_that("colData and rowData bin2d", {
expect_doppelganger("colData bin2d", {
plotColDataBin2D(sfe_cosmx, "nCounts", "nGenes")
})
expect_doppelganger("colData bin2d with hexbin", {
plotColDataBin2D(sfe_cosmx, "nCounts", "nGenes", hex = TRUE)
})
expect_doppelganger("rowData bin2d", {
plotRowDataBin2D(sfe_cosmx, "means", "vars", bins = 50) +
scale_x_log10() + scale_y_log10()
})
expect_doppelganger("rowData bin2d with subset", {
plotRowDataBin2D(sfe_cosmx, "means", "vars", subset = "is_neg",
name_true = "Counts (negative controls)",
name_false = "Counts (real genes)", bins = 50) +
scale_x_log10() + scale_y_log10()
})
expect_doppelganger("rowData bin2d with subset and default legend", {
plotRowDataBin2D(sfe_cosmx, "means", "vars", subset = "is_neg",
bins = 50) +
scale_x_log10() + scale_y_log10()
})
expect_doppelganger("colData bin2d for multiple samples", {
plotColDataBin2D(sfe_cosmx2, "nCounts", "nGenes",
facet_by = "sample_id")
})
expect_warning(plotColDataBin2D(sfe_cosmx, "nCounts", "nGenes",
facet_by = "nCounts"),
"Not facetting")
expect_warning(plotColDataBin2D(sce = sfe_cosmx, x = "nCounts",
y = "nGenes"),
"deprecated")
Expand Down

0 comments on commit 09578e3

Please sign in to comment.