Skip to content

Commit

Permalink
Merge pull request #8 from gaborcsardi/fix/tryerrorintest
Browse files Browse the repository at this point in the history
Get rid of the annoying try() error in the tests
  • Loading branch information
jeroen authored Mar 11, 2017
2 parents c6941eb + 3ca4224 commit ac7cd9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-forking.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ test_that("eval_fork gives errors", {
expect_error(eval_fork(Sys.sleep(10), timeout = 2), "timeout")

# Test that tryCatch works
expect_equal(eval_fork(try(pi)), pi)
expect_is(eval_fork(try(blabla())), "try-error")
expect_equal(eval_fork(try(pi, silent = TRUE)), pi)
expect_is(eval_fork(try(blabla(), silent = TRUE)), "try-error")
expect_is(eval_fork(tryCatch(blabla(), error = identity)), "simpleError")
})

0 comments on commit ac7cd9a

Please sign in to comment.