Skip to content
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

export_error should warn if text match but class exists #816

Closed
hadley opened this issue Nov 13, 2018 · 2 comments
Closed

export_error should warn if text match but class exists #816

hadley opened this issue Nov 13, 2018 · 2 comments

Comments

@hadley
Copy link
Member

@hadley hadley commented Nov 13, 2018

If you call expect_error(error_with_class(), "text") testthat should warn that it's better to use class.

@gaborcsardi
Copy link
Contributor

@gaborcsardi gaborcsardi commented Apr 1, 2019

Hmmm, this will cause some damage I am afraid. But we'll see in the revdep checks....

@hadley
Copy link
Member Author

@hadley hadley commented Apr 1, 2019

It only generates a warning in the tests which doesn't affect R CMD check, so it should be ok.

richfitz added a commit to mrc-ide/odin that referenced this issue May 8, 2019
Change introduced in
r-lib/testthat#816

requires update to ~200 tests as warnings make identification of
test failures almost impossible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants