Skip to content

Commit

Permalink
tests: disable parallel processing in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Apr 3, 2024
1 parent 706b730 commit fd09f2c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/testthat.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@ library(xcms)
library(faahKO)
library(MSnbase)
library(msdata)

if (.Platform$OS.type == "unix") {
prm <- MulticoreParam(3)
} else {
# prm <- SnowParam(3)
prm <- SerialParam()
}
register(bpstart(prm))
library(BiocParallel)
register(SerialParam())

## Create some objects we can re-use in different tests:
faahko_3_files <- c(system.file('cdf/KO/ko15.CDF', package = "faahKO"),
Expand All @@ -19,7 +13,7 @@ faahko_3_files <- c(system.file('cdf/KO/ko15.CDF', package = "faahKO"),

cwp <- CentWaveParam(noise = 10000, snthresh = 40, prefilter = c(3, 10000))
faahko_od <- readMSData(faahko_3_files, mode = "onDisk")
faahko_xod <- findChromPeaks(faahko_od, param = cwp)
faahko_xod <- findChromPeaks(faahko_od, param = cwp, BPPARAM = SerialParam())
od_x <- faahko_od
mzr <- matrix(c(335, 335, 344, 344), ncol = 2, byrow = TRUE)
od_chrs <- chromatogram(od_x, mz = mzr)
Expand Down

0 comments on commit fd09f2c

Please sign in to comment.