Skip to content

Commit

Permalink
Do not export functions when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhester committed Jun 6, 2016
1 parent 2a8c73b commit c225f5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# devtools 1.11.1.9000

* `test()` now calls `load_all()` with `export_all=FALSE`, so functions are not
automatically exported to the users environment after running tests.
(@jimhester, #1201, #1210).

* `use_dev_version()` automates the process of switching from a release
version number by tweaking the `DESCRIPTION`, adding a heading to
`NEWS.md` (if present), and checking into git (if you use it) (#1076.)
Expand Down
2 changes: 1 addition & 1 deletion R/test.r
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test <- function(pkg = ".", filter = NULL, ...) {
# Run tests in a child of the namespace environment, like
# testthat::test_package
message("Loading ", pkg$package)
ns_env <- load_all(pkg, quiet = TRUE)$env
ns_env <- load_all(pkg, quiet = TRUE, export_all = FALSE)$env

message("Testing ", pkg$package)
Sys.sleep(0.05); utils::flush.console() # Avoid misordered output in RStudio
Expand Down

0 comments on commit c225f5f

Please sign in to comment.