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
Test conditionally on 'forecast' package - otherwise check error #38
Comments
Thanks for submitting this. I was under the impression that it was standard practice to install all the Suggests packages before running tests. Is that not the case? If not, I have a lot of other tests to fix as well :). |
Although it's common practice it's not required. When Suggests:ed packages are missing,
but they should never give an ERROR in the tests. We use the same rationale when there's a Suggests:ed package that is only available on a single OS - then we test the code that depends on that conditionally on that OS. We would never accept tests to fail for the non-supported OSes. There's been several discussion about this in the past, e.g. https://stat.ethz.ch/pipermail/r-devel/2016-April/072548.html. I like this thought:
which is also why it's not really enforced - it would be tricky for CRAN to test packages this way. However, I wouldn't be surprised if they one day check for this using static code inspection. I also argue that it's better if each package developer is the gate keeper for their code, including their tests, to work with and without Suggests:ed packages. Otherwise, it'll be really complicated to do reverse package dependency tests (which is how I found yours) - because some Suggests:ed dependencies may be nested deep down. |
Thanks for pointing this out @HenrikBengtsson. It's been fixed by 5e2ca19 and has been resubmitted to CRAN. |
I think your
origami/tests/testthat/test-overall_timeseries.R
Line 1 in a53ccfa
instead, because the 'forecast' package is optional (listed only in Suggests). Without the package installed, you get:
The text was updated successfully, but these errors were encountered: