- Notifications
You must be signed in to change notification settings - Fork85
Makelocal_temp_app() usage more consistent#844
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
And use it consistently
| test_that("returns relative paths", { | ||
| dir<-withr::local_tempdir() | ||
| dir<-local_temp_app() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Do you expect that this will become:
dir<- local_temp_app("x/a"="","x/b"="","x/c"="')
local_temp_app would need to change todir.create(dirname(files)), but that's in reach, if you want it.
The challenge would be the cases where you want to create empty directories as part of the test set-up. Maybe:
dir<- local_temp_app("packrat/"="")
None of this is must-take. Just musing on ways to simply describe "create this set of files / directories" without requiring every test to have its own creation code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yeah, I had contemplated that too. If you were thinking the same thing, I think it's a sign that it's worth doing.
#Conflicts:#tests/testthat/test-applications.R#tests/testthat/test-bundleFiles.R#tests/testthat/test-deployApp.R#tests/testthat/test-deploymentTarget.R
And make it a little easier to use with
...