Running ‘testthat.R’ [2s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(remotes)
  > 
  > test_check("remotes")
  ── 1. Error: decompress with internal unzip (@test-decompress.R#35)  ───────────
  Can't mock functions in base packages (base)
  1: with_mock(`base::getOption` = function(x, default = NULL) {
         if (x == "unzip") {
             "internal"
         }
         else {
             if (missing(default) || x %in% names(options())) {
                 options()[[x]]
             }
             else {
                 default
             }
         }
     }, decompress(archive, dec)) at testthat/test-decompress.R:35
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
  
  ── 2. Error: download_method (@test-download.R#17)  ────────────────────────────
  Can't mock functions in base packages (base)
  1: with_mock(`remotes::get_r_version` = function(...) "3.2.5", `remotes::os_type` = function() "unix", 
         `base::capabilities` = function(...) c(libcurl = TRUE), expect_equal(download_method(), 
             "libcurl")) at testthat/test-download.R:17
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
  
  ── 3. Error: download basic auth (@test-download.R#58)  ────────────────────────
  Can't mock functions in base packages (utils)
  1: with_mock(`utils::download.file` = function(url, ...) {
         print(url)
         0
     }, expect_output(download(tempfile(), "http://foo.bar.com", basic_auth = list(user = "user", 
         password = "password")), "http://user:password@foo.bar.com")) at testthat/test-download.R:58
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
  
  ── 4. Error: git not quiet (@test-git.R#29)  ───────────────────────────────────
  Can't mock functions in base packages (base)
  1: with_mock(`remotes:::check_git_path` = function(...) "/foo/git", `base::system` = function(...) "0", 
         expect_message(git(args = c("arg1", "arg2"), quiet = FALSE), "['\"]/foo/git['\"] arg1arg2")) at testthat/test-git.R:29
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
  
  ── 5. Error: git error (@test-git.R#42)  ───────────────────────────────────────
  Can't mock functions in base packages (base)
  1: with_mock(`remotes::check_git_path` = function(...) "/foo/git", `base::system` = function(...) structure("foo", 
         status = "1"), expect_error(git(args = "arg"), "Command failed")) at testthat/test-git.R:42
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
  
  ── 6. Error: git_path (@test-git.R#64)  ────────────────────────────────────────
  Can't mock functions in base packages (base)
  1: with_mock(`base::Sys.which` = function(...) "", `remotes::os_type` = function() "windows", 
         `base::file.exists` = function(...) FALSE, expect_null(git_path())) at testthat/test-git.R:64
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
  
  ── 7. Error: remote_download.svn_remote error (@test-install-svn.R#79)  ────────
  Can't mock functions in base packages (base)
  1: with_mock(`base::system2` = function(...) {
         1
     }, expect_error(remote_download.svn_remote(x), "There seems to be a problem retrieving")) at testthat/test-install-svn.R:79
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
  
  ── 8. Error: svn_path (@test-install-svn.R#134)  ───────────────────────────────
  Can't mock functions in base packages (base)
  1: with_mock(`base::Sys.which` = function(...) "", `remotes::os_type` = function() "windows", 
         `base::file.exists` = function(...) FALSE, expect_error(svn_path(), "SVN does not seem to be installed on your system")) at testthat/test-install-svn.R:134
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
  
  ── 9. Failure: system_check (@test-system.R#6)  ────────────────────────────────
  `with_mock(...)` threw an error with unexpected message.
  Expected match: "Command foobar failed "
  Actual message: "Can't mock functions in base packages (base)"
  
  ── 10. Failure: system_check (@test-system.R#16)  ──────────────────────────────
  `with_mock(...)` threw an error with unexpected message.
  Expected match: "Command foobar failed"
  Actual message: "Can't mock functions in base packages (base)"
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 130 SKIPPED: 34 FAILED: 10
  1.  Error: decompress with internal unzip (@test-decompress.R#35) 
  2.  Error: download_method (@test-download.R#17) 
  3.  Error: download basic auth (@test-download.R#58) 
  4.  Error: git not quiet (@test-git.R#29) 
  5.  Error: git error (@test-git.R#42) 
  6.  Error: git_path (@test-git.R#64) 
  7.  Error: remote_download.svn_remote error (@test-install-svn.R#79) 
  8.  Error: svn_path (@test-install-svn.R#134) 
  9.  Failure: system_check (@test-system.R#6) 
  10. Failure: system_check (@test-system.R#16) 
  
  Error: testthat unit tests failed
  Execution halted