Feature suggestion: recursively test directories with run_test_dir
#106
Labels
enhancement
New feature or request
run_test_dir
#106
There has been a lot of movement to make R code more modular, most recently with the box package, which supports Python-like imports and treats files as encapsulated modules.
This allows for a much cleaner structure than a regular R package does, as now you can have as many nested directories in
R/
as you want. A lot ofshiny
app frameworks like rhino also move into this direction, and a lot of best-practice talks at conferences recommend related approaches such as modules that promote more encapsulation than R can offer.The downside is that so far I haven't found a clean approach that would support testing a structure like that, since always regular package structures are expected. I created a hacky solution using
tinytest
:Would it be possible to support something like
recurse = TRUE
torun_test_dir
out of the box or are there drawbacks to this? With an approach like this, it's not the test package's duty to somehow find the code that should be tested, each test file imports the code itself.The text was updated successfully, but these errors were encountered: