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

new behavior of suppressing messages and warnings in tests is wrong #254

Closed
kforner opened this issue May 6, 2015 · 3 comments
Closed

new behavior of suppressing messages and warnings in tests is wrong #254

kforner opened this issue May 6, 2015 · 3 comments
Milestone

Comments

@kforner
Copy link
Contributor

@kforner kforner commented May 6, 2015

Because:

  1. warnings can be very useful to detect bugs in the tests and in the code to be tested
    If you want to get rid of some (once you understand them, just suppress them using suppressMessages or suppressWarnings, or better test them using expect_warning

  2. now it is impossible to test code that deals with warnings. For instance suppose that you want to test a function that turns warnings into errors using the warn=2 option, it does no longer work in testthat tests.

  3. code does not behave like in the real R world.

just my opinion.

@hadley
Copy link
Member

@hadley hadley commented Sep 24, 2015

Hmmm, I think that ignoring messages is the right thing to do (in the same way printed output is ignored), but ignoring warnings might be too much.

@kforner
Copy link
Contributor Author

@kforner kforner commented Sep 24, 2015

Agreed.

@hadley hadley modified the milestone: 0.11.0 Sep 29, 2015
@hadley hadley closed this in 6403639 Sep 29, 2015
@kforner
Copy link
Contributor Author

@kforner kforner commented Sep 29, 2015

great !

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