-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Description
See this testcase: as the function is not producing an error, I would expect one error to be reported:
test_that("showing problem", {
local_edition(3)
expect_error(identity(1),
"Error message", fixed = TRUE)
})Instead, besides an error I also get a warning and backtrace just because I am using fixed = TRUE:
ββ Testing test_test.R ββββββββββββββββββββββββββββββββββββββββββββββββββ
[ FAIL 1 | WARN 1 | SKIP 0 | PASS 0 ]
ββ Failure (test_test.R:3:3): showing problem ββββββββββββββββββββββββββββββββββ
`identity(1)` did not throw the expected error.
ββ Warning (test_test.R:3:3): showing problem ββββββββββββββββββββββββββββββββββ
Arguments in `...` must be used.
x Problematic argument:
* fixed = TRUE
i Did you misspell an argument name?
Backtrace:
β
1. ββtestthat::expect_error(identity(1), "Error message", fixed = TRUE) at test_test.R:3:3
2. β ββtestthat:::expect_condition_matching(...)
3. β ββrlang (local) `<fn>`()
4. β ββrlang:::check_dots(env, error, action, call)
5. β ββrlang:::action_dots(...)
6. β ββrlang (local) try_dots(...)
7. β β ββrlang::try_fetch(expr, error = error)
8. β β ββbase::tryCatch(...)
9. β β β ββbase (local) tryCatchList(expr, classes, parentenv, handlers)
10. β β β ββbase (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
11. β β β ββbase (local) doTryCatch(return(expr), name, parentenv, handler)
12. β β ββbase::withCallingHandlers(...)
13. β ββrlang (local) action(...)
14. β ββrlang:::signal_abort(cnd, .file)
15. β ββbase::signalCondition(cnd)
16. ββrlang (local) `<fn>`(`<rlb_rr__>`)
17. ββhandlers[[1L]](cnd)
[ FAIL 1 | WARN 1 | SKIP 0 | PASS 0 ]
Metadata
Metadata
Assignees
Labels
No labels