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

Using with_output_sink() causing unit tests to fail #67

Closed
mwmclean opened this issue Feb 7, 2018 · 1 comment
Closed

Using with_output_sink() causing unit tests to fail #67

mwmclean opened this issue Feb 7, 2018 · 1 comment

Comments

@mwmclean
Copy link

mwmclean commented Feb 7, 2018

SWIM has some unit tests that loop over combinations of argument values for a function and call a print method and just check that no errors are thrown. The printing causes a bunch of output I don't particularly want to appear on the console when I use testthat::test_file() and also creates a bunch of output in the travis-CI log files I don't want either. I was hoping I could use with_output_sink() to still run the tests, but without all the annoying output. Unfortunately, this causes an error in a very innocuous looking part of the code that I can't reproduce if I remove the call to with_output_sink(). The test file is here.

@mwmclean
Copy link
Author

mwmclean commented Feb 7, 2018

I fixed this by moving the call to with_output_sink() outside the loop.

@mwmclean mwmclean closed this as completed Feb 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant