Skip to content

expect_error() is being used too much #1096

New issue

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

Closed
EmilHvitfeldt opened this issue Apr 2, 2024 · 1 comment · Fixed by #1190
Closed

expect_error() is being used too much #1096

EmilHvitfeldt opened this issue Apr 2, 2024 · 1 comment · Fixed by #1190
Labels
upkeep maintenance, infrastructure, and similar

Comments

@EmilHvitfeldt
Copy link
Member

as an example the following test https://github.com/tidymodels/parsnip/blob/main/tests/testthat/test_decision_tree.R#L15-L18

  expect_snapshot_error({
    bt <- decision_tree(cost_complexity = -1) %>% set_engine("rpart")
    fit(bt, class ~ ., hpc)
  })

is expected to test that cost_complexity isn’t good, but it instead tests that the mode isn’t set

#> Error in `fit()`:
#> ! Please set the mode in the model specification.
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
upkeep maintenance, infrastructure, and similar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant