Open
Conversation
And use it consistently
aronatkins
approved these changes
May 9, 2023
|
|
||
| test_that("returns relative paths", { | ||
| dir <- withr::local_tempdir() | ||
| dir <- local_temp_app() |
Contributor
There was a problem hiding this comment.
Do you expect that this will become:
dir <- local_temp_app(
"x/a" = "",
"x/b" = "",
"x/c" = "'
)local_temp_app would need to change to dir.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.
Member
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
And make it a little easier to use with
...