Skip to content

Commit b362df9

Browse files
committed
ci: skip if missing file
1 parent 474effe commit b362df9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/testthat/test-read_chroms.R

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ library(testthat)
33
path_csv <- "testdata/dad1.csv"
44
path_uv <- "testdata/dad1.uv" #chemstation 131
55

6-
x <- read_chroms(path_csv, format_in = "chemstation_csv", progress_bar = FALSE)
6+
x <- read_chroms(path_csv, format_in = "chemstation_csv", progress_bar = FALSE)[[1]]
7+
8+
test_that("Aston parser can read `Agilent Chemstation` 131 files", {
9+
skip_if_missing_dependencies()
10+
skip_if_not(file.exists(path_csv))
11+
skip_if_not(file.exists(path_uv))
712

8-
test_that("aston parser can read `Agilent Chemstation` 131 files", {
9-
skip_if_missing_dependecies()
1013
paths <- rep(path_uv, 2)
14+
1115
x1 <- read_chroms(paths, format_in = "chemstation_uv", parser = "aston",
1216
find_files = FALSE,
1317
read_metadata = TRUE, progress_bar = FALSE)
18+
1419
expect_equal(as.numeric(x[[1]][,1]), as.numeric(x1[[1]][, "220.0"]))
1520
expect_equal(as.numeric(rownames(x[[1]])), as.numeric(rownames(x1[[1]])))
1621
expect_equal(length(x1), length(paths))

0 commit comments

Comments
 (0)