You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to add a recursive argument to test_dir() so that it (optionally) also looks for test files in sub-directories?
Motivation:
I have a workflow where I put long running tests - or tests that needs stuff like database access - in subfolders of the /test directory. This works really well as they are not automatically executed by devtools::test(), but I can still manually trigger them. I even made a package to support this worklfow (testthis).
Now if I want to run all tests in a directory and it's subdirectories at once, I have to resort to some really ugly code where i just use with_mock to override the test file discovery of testthat:
Hello @hadley , I submitted a PR #1850 that gives test_dir() the optional ability to recurse through nested test directories. Would you mind taking a look?
Would it be possible to add a
recursive
argument totest_dir()
so that it (optionally) also looks for test files in sub-directories?Motivation:
I have a workflow where I put long running tests - or tests that needs stuff like database access - in subfolders of the
/test
directory. This works really well as they are not automatically executed bydevtools::test()
, but I can still manually trigger them. I even made a package to support this worklfow (testthis).Now if I want to run all tests in a directory and it's subdirectories at once, I have to resort to some really ugly code where i just use
with_mock
to override the test file discovery of testthat:I'd really love to be able to remove this abomination from my package, especially since
with_mock()
is deprecated.The text was updated successfully, but these errors were encountered: