File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,15 @@ test_files_serial <- function(test_dir,
197
197
load_package = c(" none" , " installed" , " source" ),
198
198
error_call = caller_env()) {
199
199
200
+ # Because load_all() called by test_files_setup_env() will have already
201
+ # loaded them. We don't want to rely on testthat's loading since that
202
+ # only affects the test environment and we want to keep the helpers
203
+ # loaded in the user's session.
204
+ load_package <- arg_match(load_package )
205
+ if (load_package == " source" ) {
206
+ load_helpers <- FALSE
207
+ }
208
+
200
209
env <- test_files_setup_env(test_package , test_dir , load_package , env )
201
210
# record testing env for mocks
202
211
local_testing_env(env )
@@ -244,7 +253,7 @@ test_files_setup_env <- function(test_package,
244
253
}
245
254
246
255
find_load_all_args <- function (path ) {
247
- default <- list (export_all = TRUE , helpers = FALSE )
256
+ default <- list (export_all = TRUE , helpers = TRUE )
248
257
249
258
desc <- find_description(path )
250
259
if (is.null(desc )) {
You can’t perform that action at this time.
0 commit comments