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

hadley opened this issue Nov 13, 2018 · 2 comments


None yet
2 participants
Copy link

commented Nov 13, 2018

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

@hadley hadley added this to the testthat 2.1.0 milestone Apr 1, 2019

@hadley hadley closed this in 9fb8875 Apr 1, 2019


This comment has been minimized.

Copy link

commented Apr 1, 2019

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


This comment has been minimized.

Copy link
Member Author

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

Update tests to cope with testthat behaviour change
Change introduced in

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
You can’t perform that action at this time.