Skip to content

Commit

Permalink
bioc test fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Dec 12, 2024
1 parent ff51d1c commit eb59310
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 44 deletions.
36 changes: 0 additions & 36 deletions tests/testthat/_snaps/bioconductor.md

This file was deleted.

10 changes: 2 additions & 8 deletions tests/testthat/test-bioconductor.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,14 @@ test_that("Bioconductor packages add BiocManager as a dependency", {
snapshot()
writeLines("library(BiocGenerics)", "dependencies.R")

expect_snapshot(status(), transform = strip_versions)
lockfile <- snapshot()
expect_setequal(names(lockfile$Packages), c("BiocManager", "BiocGenerics", "BiocVersion"))
expect_contains(names(lockfile$Packages), "BiocManager")

# And it goes away when we remove the dependency
unlink("dependencies.R")
lockfile <- snapshot()
records <- renv_lockfile_records(lockfile)
expect_length(records, 0L)
expect_snapshot(status())

})

Expand Down Expand Up @@ -177,11 +175,7 @@ test_that("auto-bioc install happens silently", {
renv_tests_scope_system_cache()
defer(unloadNamespace("BiocManager"))

expect_snapshot(
install("bioc::BiocGenerics"),
transform = function(x) strip_versions(strip_dirs(x))
)

install("bioc::BiocGenerics")
expect_true(renv_package_installed("BiocManager"))

})
Expand Down

0 comments on commit eb59310

Please sign in to comment.