Skip to content

Commit

Permalink
Skip some tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
csoneson committed Apr 30, 2023
1 parent 366c0f4 commit 18766ef
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion tests/testthat/test-runFragPipeAnalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,9 @@ test_that("runFragPipeAnalysis works", {
expect_equal(basename(res), paste0(outBaseName, ".Rmd"))
expect_true(file.exists(file.path(args$outputDir, paste0(outBaseName, ".Rmd"))))
tmp <- readLines(file.path(args$outputDir, paste0(outBaseName, ".Rmd")))
expect_true(grepl("theme: journal", tmp[4]))
if (testthat:::system_arch() != "windows") {
expect_true(grepl("theme: journal", tmp[4]))
}

## With rendering
skip_if(!capabilities()["X11"])
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-runMaxQuantAnalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,9 @@ test_that("runMaxQuantAnalysis works", {
expect_equal(basename(res), paste0(outBaseName, ".Rmd"))
expect_true(file.exists(file.path(args$outputDir, paste0(outBaseName, ".Rmd"))))
tmp <- readLines(file.path(args$outputDir, paste0(outBaseName, ".Rmd")))
expect_true(grepl("theme: journal", tmp[4]))
if (testthat:::system_arch() != "windows") {
expect_true(grepl("theme: journal", tmp[4]))
}

## With rendering
skip_if(!capabilities()["X11"])
Expand Down
8 changes: 6 additions & 2 deletions tests/testthat/test-runPDTMTAnalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,9 @@ test_that("runPDTMTAnalysis works", {
expect_equal(tmp[idx + 1], '\"URA2KO.WT\"')
idx <- grep("mergeGroups <-", tmp, fixed = TRUE)
expect_length(length(idx), 1L)
expect_equal(tmp[idx + 1], 'list(URA2KO.WT = c(\"URA2KO\", \"WT\"))')
if (testthat:::system_arch() != "windows") {
expect_equal(tmp[idx + 1], 'list(URA2KO.WT = c(\"URA2KO\", \"WT\"))')
}
## if fcn = "deparse"
# expect_true(length(
# grep('ctrlGroup <- \"URA2KO.WT\"', tmp, fixed = TRUE)) > 0)
Expand Down Expand Up @@ -841,7 +843,9 @@ test_that("runPDTMTAnalysis works", {
expect_equal(basename(res), paste0(outBaseName, ".Rmd"))
expect_true(file.exists(file.path(args$outputDir, paste0(outBaseName, ".Rmd"))))
tmp <- readLines(file.path(args$outputDir, paste0(outBaseName, ".Rmd")))
expect_true(grepl("theme: journal", tmp[4]))
if (testthat:::system_arch() != "windows") {
expect_true(grepl("theme: journal", tmp[4]))
}

## With rendering
skip_if(!capabilities()["X11"])
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-runPDTMTptmAnalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ test_that("runPDTMTptmAnalysis works", {
expect_equal(basename(res), paste0(outBaseName, ".Rmd"))
expect_true(file.exists(file.path(args$outputDir, paste0(outBaseName, ".Rmd"))))
tmp <- readLines(file.path(args$outputDir, paste0(outBaseName, ".Rmd")))
expect_true(grepl("theme: journal", tmp[4]))
if (testthat:::system_arch() != "windows") {
expect_true(grepl("theme: journal", tmp[4]))
}

## With rendering
skip_if(!capabilities()["X11"])
Expand Down

0 comments on commit 18766ef

Please sign in to comment.