File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 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,
197197 load_package = c(" none" , " installed" , " source" ),
198198 error_call = caller_env()) {
199199
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+
200209 env <- test_files_setup_env(test_package , test_dir , load_package , env )
201210 # record testing env for mocks
202211 local_testing_env(env )
@@ -244,7 +253,7 @@ test_files_setup_env <- function(test_package,
244253}
245254
246255find_load_all_args <- function (path ) {
247- default <- list (export_all = TRUE , helpers = FALSE )
256+ default <- list (export_all = TRUE , helpers = TRUE )
248257
249258 desc <- find_description(path )
250259 if (is.null(desc )) {
You can’t perform that action at this time.
0 commit comments