We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
...
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:
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 ]
The text was updated successfully, but these errors were encountered:
Duplicate of #1932 (which should be fixed shortly)
Sorry, something went wrong.
No branches or pull requests
See this testcase: as the function is not producing an error, I would expect one error to be reported:
Instead, besides an error I also get a warning and backtrace just because I am using
fixed = TRUE
:The text was updated successfully, but these errors were encountered: