-
Notifications
You must be signed in to change notification settings - Fork 758
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
Harmonise devtools with testthat and cmdcheck #2577
Comments
This is generally a sign that something is wonky with your package and its test suite, I'm afraid. Based on the above it sounds like you're not using testthat in the way it's meant to be used, so that is where I would start troubleshooting. This is very unconventional usage:
|
Thank you for your helpful reply. As suggested I did some troubleshooting and arrived at the following conclusions:
It seems that the application continues with the new re-required environment and that devtools continues with the old one. As a consequence the value of menu became different. For your convenience, I uploaded the testTest package to gitHub and added a vignette with details results and a remedy. See https://github.com/Pisca46/testTest |
devtools::test() report failures not reported with rcmdcheck(), the “Run Test” button in RSudio or e.g. testthat::test_dir(). Also, my package under test seems to work well.
I am testing a package with data in an environment. The initial (‘factory’)data is created when the package is build and it may be manipulated later by its users.
A minimal package producing the issue is shown below. It also contains two work-arounds:
1. Include “testEnvir <- testTest:::testEnvir” in setMenu() But this would produce notes that the “::::” are rarely needed
2. Remove the ‘detach’ function in the test file. But I want the guarantee to test always on the same data
My package, called testTest, contains only the following one R file:
And the following test file:
The text was updated successfully, but these errors were encountered: