Skip to content

Commit

Permalink
some test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sheridar committed Nov 13, 2023
1 parent a392955 commit 13704b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/testthat/test-calc-gene-usage.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ test_all_args(

x <- gns |>
purrr::set_names() |>
map(~ {
purrr::map(~ {
dat[[.x]] |>
map(stringr::str_split, ";") |>
purrr::map(stringr::str_split, ";") |>
purrr::flatten()
})

# Get total n cells
n_cells <- map_int(x, length) |>
n_cells <- purrr::map_int(x, length) |>
unique()

stopifnot(length(n_cells) == 1)
Expand All @@ -94,12 +94,12 @@ test_all_args(
chns <- x$chains

chns <- chns |>
map(~ .x %in% chain)
purrr::map(~ .x %in% chain)

x <- x[names(x) != "chains"]

x <- x |>
map(~ purrr::map2(.x, chns, ~ .x[.y])) |>
purrr::map(~ purrr::map2(.x, chns, ~ .x[.y])) |>
map(~ map(.x, ~ {
if (purrr::is_empty(.x)) .x <- "None"
.x
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-import-vdj.R
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ test_that("import_vdj bad prefixes", {
import_vdj(vdj_dir = dat)
}

expect_error(fn(), "do not match those in the input")
expect_error(fn(), "do not match those")
})

# Check bad separator
Expand Down

0 comments on commit 13704b2

Please sign in to comment.