Skip to content

Commit

Permalink
tests updated
Browse files Browse the repository at this point in the history
  • Loading branch information
DomBennett committed Nov 5, 2019
1 parent f8f439b commit 6d84fc2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tests/testthat/test-stage1.R
Expand Up @@ -29,7 +29,9 @@ test_that('taxise_run() works', {
phylotaR:::cleanup(wd)
test_that('txids_get() works', {
mock_search <- function(...) {
list('count' = 100, 'ids' = as.character(1:100))
res <- list('count' = 100, 'ids' = as.character(1:100))
class(res) <- 'esearch'
res
}
phylotaR:::cache_setup(ps)
res <- with_mock(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tools-blast.R
Expand Up @@ -32,7 +32,7 @@ test_that('blastn_run() works', {
test_that('outfmt_get() works', {
res <- with_mock(
`phylotaR:::blastdb_gen` = function(...) 0,
`phylotaR:::blastn_run` = function(...) 0,
`phylotaR:::cmdln` = function(...) 0,
phylotaR:::outfmt_get(ps = ps)
)
expect_true(inherits(res, 'character'))
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-tools-entrez.R
Expand Up @@ -14,7 +14,9 @@ esearch_mock <- function(db, term, retmax, retstart, ...) {
} else {
ids <- as.character(1:n)
}
list('ids' = ids, 'count' = n)
res <- list('ids' = ids, 'count' = n)
class(res) <- 'esearch'
res
}
efetch_mock <- function(retmax, ...) {
# when rettype == 'acc'
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tools-pipeline.R
Expand Up @@ -35,7 +35,7 @@ test_that('parameters_setup() works', {
phylotaR:::parameters_setup(wd = wd, txid = 9606, ncbi_execs = ncbi_execs)
)
ps <- phylotaR:::parameters_load(wd = wd)
expect_true(length(ps) == 21)
expect_true(length(ps) == 22)
})
phylotaR:::cleanup(wd)
test_that('stage_args_check() works', {
Expand Down

0 comments on commit 6d84fc2

Please sign in to comment.