Last updated on 2018-05-03 10:51:36 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 0.2.2 | 1.33 | 24.99 | 26.32 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 0.2.2 | 1.40 | 22.71 | 24.11 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 0.2.2 | 37.03 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 0.2.2 | 35.75 | ERROR | |||
r-devel-windows-ix86+x86_64 | 0.2.2 | 5.00 | 110.00 | 115.00 | ERROR | |
r-patched-linux-x86_64 | 0.2.2 | 2.15 | 26.59 | 28.74 | ERROR | |
r-patched-solaris-x86 | 0.2.2 | 3.50 | ERROR | |||
r-release-linux-x86_64 | 0.2.2 | 1.89 | 26.21 | 28.10 | ERROR | |
r-release-windows-ix86+x86_64 | 0.2.2 | 5.00 | 110.00 | 115.00 | ERROR | |
r-release-osx-x86_64 | 0.2.2 | ERROR | ||||
r-oldrel-windows-ix86+x86_64 | 0.2.2 | 4.00 | 56.00 | 60.00 | ERROR | |
r-oldrel-osx-x86_64 | 0.2.2 | OK |
Version: 0.2.2
Check: tests
Result: ERROR
Running ‘testthat.R’ [1s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(wdman)
>
> test_check("wdman")
── 1. Error: canCallChrome (@test-chrome.R#3) ─────────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = binman_process_yaml, `binman::list_versions` = mock_binman_list_versions_chrome,
`binman::app_dir` = mock_binman_app_dir, `base::normalizePath` = mock_base_normalizePath,
`base::list.files` = mock_base_list.files, `subprocess::spawn_process` = mock_subprocess_spawn_process,
`subprocess::process_return_code` = mock_subprocess_process_return_code, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, {
cDrv <- chrome()
retCommand <- chrome(retcommand = TRUE)
expect_identical(cDrv$output(), "infun")
expect_identical(cDrv$error(), "infun")
logOut <- cDrv$log()[["stdout"]]
logErr <- cDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(cDrv$stop(), "stopped")
}) at testthat/test-chrome.R:3
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: pickUpErrorFromReturnCode (@test-chrome.R#43) ────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_chrome, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(chrome(version = "2.24"), "Chromedriver couldn't be started")
}) at testthat/test-chrome.R:43
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: pickUpErrorFromPortInUse (@test-chrome.R#62) ─────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_chrome, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address already in use")
}, {
expect_error(chrome(version = "2.24"), "Chrome Driver signals port")
}) at testthat/test-chrome.R:62
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: canCallGecko (@test-gecko.R#4) ───────────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `wdman:::generic_start_log` = mock_generic_start_log,
`wdman:::infun_read` = function(...) {
"infun"
}, {
gDrv <- gecko()
retCommand <- gecko(retcommand = TRUE)
expect_identical(gDrv$output(), "infun")
expect_identical(gDrv$error(), "infun")
logOut <- gDrv$log()[["stdout"]]
logErr <- gDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(gDrv$stop(), "stopped")
}) at testthat/test-gecko.R:4
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: pickUpErrorFromReturnCode (@test-gecko.R#44) ─────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(gecko(version = "0.11.0"), "Geckodriver couldn't be started")
}) at testthat/test-gecko.R:44
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: pickUpErrorFromPortInUse (@test-gecko.R#63) ──────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address in use")
}, {
expect_error(gecko(version = "0.11.0"), "Gecko Driver signals port")
}) at testthat/test-gecko.R:63
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: canCallIEDriver (@test-iedriver.R#4) ─────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, {
ieDrv <- iedriver()
retCommand <- iedriver(retcommand = TRUE)
expect_identical(ieDrv$output(), "infun")
expect_identical(ieDrv$error(), "infun")
logOut <- ieDrv$log()[["stdout"]]
logErr <- ieDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(ieDrv$stop(), "stopped")
}) at testthat/test-iedriver.R:4
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: pickUpErrorFromReturnCode (@test-iedriver.R#46) ──────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
`base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, {
expect_error(iedriver(version = "3.0.0"), "iedriver couldn't be started")
}) at testthat/test-iedriver.R:46
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. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68) ───────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address in use")
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, {
expect_error(iedriver(version = "3.0.0"), "IE Driver signals port")
}) at testthat/test-iedriver.R:68
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)
── 10. Error: canCallPhantomJS (@test-phantom.R#4) ────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `wdman:::generic_start_log` = mock_generic_start_log,
`wdman:::infun_read` = function(...) {
"infun"
}, {
pDrv <- phantomjs(version = "latest")
retCommand <- phantomjs(version = "latest", retcommand = TRUE)
expect_identical(pDrv$output(), "infun")
expect_identical(pDrv$error(), "infun")
logOut <- pDrv$log()[["stdout"]]
logErr <- pDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(pDrv$stop(), "stopped")
}) at testthat/test-phantom.R:4
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)
── 11. Error: pickUpErrorFromReturnCode (@test-phantom.R#44) ──────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(phantomjs(version = "2.1.1"), "PhantomJS couldn't be started")
}) at testthat/test-phantom.R:44
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)
── 12. Error: pickUpErrorFromPortInUse (@test-phantom.R#63) ───────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stdout = "GhostDriver - main.fail.*sourceURL")
}, {
expect_error(phantomjs(version = "2.1.1"), "PhantomJS signals port")
}) at testthat/test-phantom.R:63
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)
── 13. Error: canCallSelenium (@test-selenium.R#4) ────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, {
selServ <- selenium(iedrver = "latest")
retCommand <- selenium(iedrver = "latest", retcommand = TRUE)
expect_identical(selServ$output(), "infun")
expect_identical(selServ$error(), "infun")
logOut <- selServ$log()[["stdout"]]
logErr <- selServ$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(selServ$stop(), "stopped")
}) at testthat/test-selenium.R:4
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)
── 14. Error: errorIfJavaNotFound (@test-selenium.R#75) ───────────────────────
Can't mock functions in base packages (base)
1: with_mock(`base::Sys.which` = function(...) {
""
}, expect_error(selenium(), "PATH to JAVA not found")) at testthat/test-selenium.R:75
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)
── 15. Error: errorIfVersionNotFound (@test-selenium.R#82) ────────────────────
Can't mock functions in base packages (base)
1: with_mock(`base::Sys.which` = function(...) {
"im here"
}, `binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, expect_error(selenium(version = "nothere"),
"version requested doesnt match versions available")) at testthat/test-selenium.R:82
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)
── 16. Error: pickUpErrorFromReturnCode (@test-selenium.R#92) ─────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
`base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_error(selenium(version = "3.0.1", iedrver = "latest"), "Selenium server couldn't be started")) at testthat/test-selenium.R:92
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)
── 17. Error: pickUpErrorFromPortInUse (@test-selenium.R#140) ─────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address already in use")
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_error(selenium(), "Selenium server signals port")) at testthat/test-selenium.R:140
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)
── 18. Error: pickUpWarningOnNoStderr (@test-selenium.R#191) ──────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = function(...) {
list(stdout = character(), stderr = character())
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_warning(selenium(), "No output to stderr yet detected")) at testthat/test-selenium.R:191
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)
══ testthat results ═══════════════════════════════════════════════════════════
OK: 26 SKIPPED: 0 FAILED: 18
1. Error: canCallChrome (@test-chrome.R#3)
2. Error: pickUpErrorFromReturnCode (@test-chrome.R#43)
3. Error: pickUpErrorFromPortInUse (@test-chrome.R#62)
4. Error: canCallGecko (@test-gecko.R#4)
5. Error: pickUpErrorFromReturnCode (@test-gecko.R#44)
6. Error: pickUpErrorFromPortInUse (@test-gecko.R#63)
7. Error: canCallIEDriver (@test-iedriver.R#4)
8. Error: pickUpErrorFromReturnCode (@test-iedriver.R#46)
9. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68)
1. ...
Error: testthat unit tests failed
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 0.2.2
Check: tests
Result: ERROR
Running ‘testthat.R’ [1s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(wdman)
>
> test_check("wdman")
── 1. Error: canCallChrome (@test-chrome.R#3) ─────────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = binman_process_yaml, `binman::list_versions` = mock_binman_list_versions_chrome,
`binman::app_dir` = mock_binman_app_dir, `base::normalizePath` = mock_base_normalizePath,
`base::list.files` = mock_base_list.files, `subprocess::spawn_process` = mock_subprocess_spawn_process,
`subprocess::process_return_code` = mock_subprocess_process_return_code, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, {
cDrv <- chrome()
retCommand <- chrome(retcommand = TRUE)
expect_identical(cDrv$output(), "infun")
expect_identical(cDrv$error(), "infun")
logOut <- cDrv$log()[["stdout"]]
logErr <- cDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(cDrv$stop(), "stopped")
}) at testthat/test-chrome.R:3
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: pickUpErrorFromReturnCode (@test-chrome.R#43) ────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_chrome, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(chrome(version = "2.24"), "Chromedriver couldn't be started")
}) at testthat/test-chrome.R:43
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: pickUpErrorFromPortInUse (@test-chrome.R#62) ─────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_chrome, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address already in use")
}, {
expect_error(chrome(version = "2.24"), "Chrome Driver signals port")
}) at testthat/test-chrome.R:62
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: canCallGecko (@test-gecko.R#4) ───────────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `wdman:::generic_start_log` = mock_generic_start_log,
`wdman:::infun_read` = function(...) {
"infun"
}, {
gDrv <- gecko()
retCommand <- gecko(retcommand = TRUE)
expect_identical(gDrv$output(), "infun")
expect_identical(gDrv$error(), "infun")
logOut <- gDrv$log()[["stdout"]]
logErr <- gDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(gDrv$stop(), "stopped")
}) at testthat/test-gecko.R:4
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: pickUpErrorFromReturnCode (@test-gecko.R#44) ─────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(gecko(version = "0.11.0"), "Geckodriver couldn't be started")
}) at testthat/test-gecko.R:44
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: pickUpErrorFromPortInUse (@test-gecko.R#63) ──────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address in use")
}, {
expect_error(gecko(version = "0.11.0"), "Gecko Driver signals port")
}) at testthat/test-gecko.R:63
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: canCallIEDriver (@test-iedriver.R#4) ─────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, {
ieDrv <- iedriver()
retCommand <- iedriver(retcommand = TRUE)
expect_identical(ieDrv$output(), "infun")
expect_identical(ieDrv$error(), "infun")
logOut <- ieDrv$log()[["stdout"]]
logErr <- ieDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(ieDrv$stop(), "stopped")
}) at testthat/test-iedriver.R:4
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: pickUpErrorFromReturnCode (@test-iedriver.R#46) ──────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
`base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, {
expect_error(iedriver(version = "3.0.0"), "iedriver couldn't be started")
}) at testthat/test-iedriver.R:46
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. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68) ───────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address in use")
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, {
expect_error(iedriver(version = "3.0.0"), "IE Driver signals port")
}) at testthat/test-iedriver.R:68
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)
── 10. Error: canCallPhantomJS (@test-phantom.R#4) ────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `wdman:::generic_start_log` = mock_generic_start_log,
`wdman:::infun_read` = function(...) {
"infun"
}, {
pDrv <- phantomjs(version = "latest")
retCommand <- phantomjs(version = "latest", retcommand = TRUE)
expect_identical(pDrv$output(), "infun")
expect_identical(pDrv$error(), "infun")
logOut <- pDrv$log()[["stdout"]]
logErr <- pDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(pDrv$stop(), "stopped")
}) at testthat/test-phantom.R:4
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)
── 11. Error: pickUpErrorFromReturnCode (@test-phantom.R#44) ──────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(phantomjs(version = "2.1.1"), "PhantomJS couldn't be started")
}) at testthat/test-phantom.R:44
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)
── 12. Error: pickUpErrorFromPortInUse (@test-phantom.R#63) ───────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stdout = "GhostDriver - main.fail.*sourceURL")
}, {
expect_error(phantomjs(version = "2.1.1"), "PhantomJS signals port")
}) at testthat/test-phantom.R:63
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)
── 13. Error: canCallSelenium (@test-selenium.R#4) ────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, {
selServ <- selenium(iedrver = "latest")
retCommand <- selenium(iedrver = "latest", retcommand = TRUE)
expect_identical(selServ$output(), "infun")
expect_identical(selServ$error(), "infun")
logOut <- selServ$log()[["stdout"]]
logErr <- selServ$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(selServ$stop(), "stopped")
}) at testthat/test-selenium.R:4
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)
── 14. Error: errorIfJavaNotFound (@test-selenium.R#75) ───────────────────────
Can't mock functions in base packages (base)
1: with_mock(`base::Sys.which` = function(...) {
""
}, expect_error(selenium(), "PATH to JAVA not found")) at testthat/test-selenium.R:75
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)
── 15. Error: errorIfVersionNotFound (@test-selenium.R#82) ────────────────────
Can't mock functions in base packages (base)
1: with_mock(`base::Sys.which` = function(...) {
"im here"
}, `binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, expect_error(selenium(version = "nothere"),
"version requested doesnt match versions available")) at testthat/test-selenium.R:82
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)
── 16. Error: pickUpErrorFromReturnCode (@test-selenium.R#92) ─────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
`base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_error(selenium(version = "3.0.1", iedrver = "latest"), "Selenium server couldn't be started")) at testthat/test-selenium.R:92
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)
── 17. Error: pickUpErrorFromPortInUse (@test-selenium.R#140) ─────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address already in use")
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_error(selenium(), "Selenium server signals port")) at testthat/test-selenium.R:140
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)
── 18. Error: pickUpWarningOnNoStderr (@test-selenium.R#191) ──────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = function(...) {
list(stdout = character(), stderr = character())
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_warning(selenium(), "No output to stderr yet detected")) at testthat/test-selenium.R:191
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)
══ testthat results ═══════════════════════════════════════════════════════════
OK: 26 SKIPPED: 0 FAILED: 18
1. Error: canCallChrome (@test-chrome.R#3)
2. Error: pickUpErrorFromReturnCode (@test-chrome.R#43)
3. Error: pickUpErrorFromPortInUse (@test-chrome.R#62)
4. Error: canCallGecko (@test-gecko.R#4)
5. Error: pickUpErrorFromReturnCode (@test-gecko.R#44)
6. Error: pickUpErrorFromPortInUse (@test-gecko.R#63)
7. Error: canCallIEDriver (@test-iedriver.R#4)
8. Error: pickUpErrorFromReturnCode (@test-iedriver.R#46)
9. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68)
1. ...
Error: testthat unit tests failed
Execution halted
Flavors: r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64, r-release-linux-x86_64
Version: 0.2.2
Check: tests
Result: ERROR
Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(wdman)
>
> test_check("wdman")
── 1. Error: canCallChrome (@test-chrome.R#3) ─────────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = binman_process_yaml, `binman::list_versions` = mock_binman_list_versions_chrome,
`binman::app_dir` = mock_binman_app_dir, `base::normalizePath` = mock_base_normalizePath,
`base::list.files` = mock_base_list.files, `subprocess::spawn_process` = mock_subprocess_spawn_process,
`subprocess::process_return_code` = mock_subprocess_process_return_code, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, {
cDrv <- chrome()
retCommand <- chrome(retcommand = TRUE)
expect_identical(cDrv$output(), "infun")
expect_identical(cDrv$error(), "infun")
logOut <- cDrv$log()[["stdout"]]
logErr <- cDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(cDrv$stop(), "stopped")
}) at testthat/test-chrome.R:3
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: pickUpErrorFromReturnCode (@test-chrome.R#43) ────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_chrome, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(chrome(version = "2.24"), "Chromedriver couldn't be started")
}) at testthat/test-chrome.R:43
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: pickUpErrorFromPortInUse (@test-chrome.R#62) ─────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_chrome, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address already in use")
}, {
expect_error(chrome(version = "2.24"), "Chrome Driver signals port")
}) at testthat/test-chrome.R:62
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: canCallGecko (@test-gecko.R#4) ───────────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `wdman:::generic_start_log` = mock_generic_start_log,
`wdman:::infun_read` = function(...) {
"infun"
}, {
gDrv <- gecko()
retCommand <- gecko(retcommand = TRUE)
expect_identical(gDrv$output(), "infun")
expect_identical(gDrv$error(), "infun")
logOut <- gDrv$log()[["stdout"]]
logErr <- gDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(gDrv$stop(), "stopped")
}) at testthat/test-gecko.R:4
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: pickUpErrorFromReturnCode (@test-gecko.R#44) ─────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(gecko(version = "0.11.0"), "Geckodriver couldn't be started")
}) at testthat/test-gecko.R:44
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: pickUpErrorFromPortInUse (@test-gecko.R#63) ──────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address in use")
}, {
expect_error(gecko(version = "0.11.0"), "Gecko Driver signals port")
}) at testthat/test-gecko.R:63
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: canCallIEDriver (@test-iedriver.R#4) ─────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, {
ieDrv <- iedriver()
retCommand <- iedriver(retcommand = TRUE)
expect_identical(ieDrv$output(), "infun")
expect_identical(ieDrv$error(), "infun")
logOut <- ieDrv$log()[["stdout"]]
logErr <- ieDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(ieDrv$stop(), "stopped")
}) at testthat/test-iedriver.R:4
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: pickUpErrorFromReturnCode (@test-iedriver.R#46) ──────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
`base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, {
expect_error(iedriver(version = "3.0.0"), "iedriver couldn't be started")
}) at testthat/test-iedriver.R:46
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. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68) ───────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address in use")
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, {
expect_error(iedriver(version = "3.0.0"), "IE Driver signals port")
}) at testthat/test-iedriver.R:68
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)
── 10. Error: canCallPhantomJS (@test-phantom.R#4) ────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `wdman:::generic_start_log` = mock_generic_start_log,
`wdman:::infun_read` = function(...) {
"infun"
}, {
pDrv <- phantomjs(version = "latest")
retCommand <- phantomjs(version = "latest", retcommand = TRUE)
expect_identical(pDrv$output(), "infun")
expect_identical(pDrv$error(), "infun")
logOut <- pDrv$log()[["stdout"]]
logErr <- pDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(pDrv$stop(), "stopped")
}) at testthat/test-phantom.R:4
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)
── 11. Error: pickUpErrorFromReturnCode (@test-phantom.R#44) ──────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(phantomjs(version = "2.1.1"), "PhantomJS couldn't be started")
}) at testthat/test-phantom.R:44
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)
── 12. Error: pickUpErrorFromPortInUse (@test-phantom.R#63) ───────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stdout = "GhostDriver - main.fail.*sourceURL")
}, {
expect_error(phantomjs(version = "2.1.1"), "PhantomJS signals port")
}) at testthat/test-phantom.R:63
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)
── 13. Error: canCallSelenium (@test-selenium.R#4) ────────────────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, {
selServ <- selenium(iedrver = "latest")
retCommand <- selenium(iedrver = "latest", retcommand = TRUE)
expect_identical(selServ$output(), "infun")
expect_identical(selServ$error(), "infun")
logOut <- selServ$log()[["stdout"]]
logErr <- selServ$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(selServ$stop(), "stopped")
}) at testthat/test-selenium.R:4
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)
── 14. Error: errorIfJavaNotFound (@test-selenium.R#75) ───────────────────────
Can't mock functions in base packages (base)
1: with_mock(`base::Sys.which` = function(...) {
""
}, expect_error(selenium(), "PATH to JAVA not found")) at testthat/test-selenium.R:75
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)
── 15. Error: errorIfVersionNotFound (@test-selenium.R#82) ────────────────────
Can't mock functions in base packages (base)
1: with_mock(`base::Sys.which` = function(...) {
"im here"
}, `binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, expect_error(selenium(version = "nothere"),
"version requested doesnt match versions available")) at testthat/test-selenium.R:82
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)
── 16. Error: pickUpErrorFromReturnCode (@test-selenium.R#92) ─────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
`base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_error(selenium(version = "3.0.1", iedrver = "latest"), "Selenium server couldn't be started")) at testthat/test-selenium.R:92
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)
── 17. Error: pickUpErrorFromPortInUse (@test-selenium.R#140) ─────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address already in use")
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_error(selenium(), "Selenium server signals port")) at testthat/test-selenium.R:140
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)
── 18. Error: pickUpWarningOnNoStderr (@test-selenium.R#191) ──────────────────
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = function(...) {
list(stdout = character(), stderr = character())
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_warning(selenium(), "No output to stderr yet detected")) at testthat/test-selenium.R:191
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)
══ testthat results ═══════════════════════════════════════════════════════════
OK: 26 SKIPPED: 0 FAILED: 18
1. Error: canCallChrome (@test-chrome.R#3)
2. Error: pickUpErrorFromReturnCode (@test-chrome.R#43)
3. Error: pickUpErrorFromPortInUse (@test-chrome.R#62)
4. Error: canCallGecko (@test-gecko.R#4)
5. Error: pickUpErrorFromReturnCode (@test-gecko.R#44)
6. Error: pickUpErrorFromPortInUse (@test-gecko.R#63)
7. Error: canCallIEDriver (@test-iedriver.R#4)
8. Error: pickUpErrorFromReturnCode (@test-iedriver.R#46)
9. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68)
1. ...
Error: testthat unit tests failed
Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Version: 0.2.2
Check: tests
Result: ERROR
Running 'testthat.R' [5s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(wdman)
>
> test_check("wdman")
-- 1. Error: canCallChrome (@test-chrome.R#3) ---------------------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = binman_process_yaml, `binman::list_versions` = mock_binman_list_versions_chrome,
`binman::app_dir` = mock_binman_app_dir, `base::normalizePath` = mock_base_normalizePath,
`base::list.files` = mock_base_list.files, `subprocess::spawn_process` = mock_subprocess_spawn_process,
`subprocess::process_return_code` = mock_subprocess_process_return_code, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, {
cDrv <- chrome()
retCommand <- chrome(retcommand = TRUE)
expect_identical(cDrv$output(), "infun")
expect_identical(cDrv$error(), "infun")
logOut <- cDrv$log()[["stdout"]]
logErr <- cDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(cDrv$stop(), "stopped")
}) at testthat/test-chrome.R:3
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: pickUpErrorFromReturnCode (@test-chrome.R#43) --------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_chrome, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(chrome(version = "2.24"), "Chromedriver couldn't be started")
}) at testthat/test-chrome.R:43
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: pickUpErrorFromPortInUse (@test-chrome.R#62) ---------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_chrome, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address already in use")
}, {
expect_error(chrome(version = "2.24"), "Chrome Driver signals port")
}) at testthat/test-chrome.R:62
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: canCallGecko (@test-gecko.R#4) -----------------------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `wdman:::generic_start_log` = mock_generic_start_log,
`wdman:::infun_read` = function(...) {
"infun"
}, {
gDrv <- gecko()
retCommand <- gecko(retcommand = TRUE)
expect_identical(gDrv$output(), "infun")
expect_identical(gDrv$error(), "infun")
logOut <- gDrv$log()[["stdout"]]
logErr <- gDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(gDrv$stop(), "stopped")
}) at testthat/test-gecko.R:4
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: pickUpErrorFromReturnCode (@test-gecko.R#44) ---------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(gecko(version = "0.11.0"), "Geckodriver couldn't be started")
}) at testthat/test-gecko.R:44
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: pickUpErrorFromPortInUse (@test-gecko.R#63) ----------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address in use")
}, {
expect_error(gecko(version = "0.11.0"), "Gecko Driver signals port")
}) at testthat/test-gecko.R:63
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: canCallIEDriver (@test-iedriver.R#4) -----------------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, {
ieDrv <- iedriver()
retCommand <- iedriver(retcommand = TRUE)
expect_identical(ieDrv$output(), "infun")
expect_identical(ieDrv$error(), "infun")
logOut <- ieDrv$log()[["stdout"]]
logErr <- ieDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(ieDrv$stop(), "stopped")
}) at testthat/test-iedriver.R:4
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: pickUpErrorFromReturnCode (@test-iedriver.R#46) ------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
`base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, {
expect_error(iedriver(version = "3.0.0"), "iedriver couldn't be started")
}) at testthat/test-iedriver.R:46
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. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68) -------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address in use")
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, {
expect_error(iedriver(version = "3.0.0"), "IE Driver signals port")
}) at testthat/test-iedriver.R:68
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)
-- 10. Error: canCallPhantomJS (@test-phantom.R#4) ----------------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `wdman:::generic_start_log` = mock_generic_start_log,
`wdman:::infun_read` = function(...) {
"infun"
}, {
pDrv <- phantomjs(version = "latest")
retCommand <- phantomjs(version = "latest", retcommand = TRUE)
expect_identical(pDrv$output(), "infun")
expect_identical(pDrv$error(), "infun")
logOut <- pDrv$log()[["stdout"]]
logErr <- pDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(pDrv$stop(), "stopped")
}) at testthat/test-phantom.R:4
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)
-- 11. Error: pickUpErrorFromReturnCode (@test-phantom.R#44) ------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(phantomjs(version = "2.1.1"), "PhantomJS couldn't be started")
}) at testthat/test-phantom.R:44
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)
-- 12. Error: pickUpErrorFromPortInUse (@test-phantom.R#63) -------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stdout = "GhostDriver - main.fail.*sourceURL")
}, {
expect_error(phantomjs(version = "2.1.1"), "PhantomJS signals port")
}) at testthat/test-phantom.R:63
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)
-- 13. Error: canCallSelenium (@test-selenium.R#4) ----------------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, {
selServ <- selenium(iedrver = "latest")
retCommand <- selenium(iedrver = "latest", retcommand = TRUE)
expect_identical(selServ$output(), "infun")
expect_identical(selServ$error(), "infun")
logOut <- selServ$log()[["stdout"]]
logErr <- selServ$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(selServ$stop(), "stopped")
}) at testthat/test-selenium.R:4
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)
-- 14. Error: errorIfJavaNotFound (@test-selenium.R#75) -----------------------
Can't mock functions in base packages (base)
1: with_mock(`base::Sys.which` = function(...) {
""
}, expect_error(selenium(), "PATH to JAVA not found")) at testthat/test-selenium.R:75
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)
-- 15. Error: errorIfVersionNotFound (@test-selenium.R#82) --------------------
Can't mock functions in base packages (base)
1: with_mock(`base::Sys.which` = function(...) {
"im here"
}, `binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, expect_error(selenium(version = "nothere"),
"version requested doesnt match versions available")) at testthat/test-selenium.R:82
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)
-- 16. Error: pickUpErrorFromReturnCode (@test-selenium.R#92) -----------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
`base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_error(selenium(version = "3.0.1", iedrver = "latest"), "Selenium server couldn't be started")) at testthat/test-selenium.R:92
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)
-- 17. Error: pickUpErrorFromPortInUse (@test-selenium.R#140) -----------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address already in use")
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_error(selenium(), "Selenium server signals port")) at testthat/test-selenium.R:140
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)
-- 18. Error: pickUpWarningOnNoStderr (@test-selenium.R#191) ------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = function(...) {
list(stdout = character(), stderr = character())
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_warning(selenium(), "No output to stderr yet detected")) at testthat/test-selenium.R:191
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)
== testthat results ===========================================================
OK: 26 SKIPPED: 0 FAILED: 18
1. Error: canCallChrome (@test-chrome.R#3)
2. Error: pickUpErrorFromReturnCode (@test-chrome.R#43)
3. Error: pickUpErrorFromPortInUse (@test-chrome.R#62)
4. Error: canCallGecko (@test-gecko.R#4)
5. Error: pickUpErrorFromReturnCode (@test-gecko.R#44)
6. Error: pickUpErrorFromPortInUse (@test-gecko.R#63)
7. Error: canCallIEDriver (@test-iedriver.R#4)
8. Error: pickUpErrorFromReturnCode (@test-iedriver.R#46)
9. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68)
1. ...
Error: testthat unit tests failed
Execution halted
Flavors: r-devel-windows-ix86+x86_64, r-release-windows-ix86+x86_64
Version: 0.2.2
Check: package dependencies
Result: ERROR
Package required but not available: ‘subprocess’
See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
Flavor: r-patched-solaris-x86
Version: 0.2.2
Check: tests
Result: ERROR
Running ‘testthat.R’ [28s/46s]
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
══ testthat results ═══════════════════════════════════════════════════════════
OK: 26 SKIPPED: 0 FAILED: 18
1. Error: canCallChrome (@test-chrome.R#3)
2. Error: pickUpErrorFromReturnCode (@test-chrome.R#43)
3. Error: pickUpErrorFromPortInUse (@test-chrome.R#62)
4. Error: canCallGecko (@test-gecko.R#4)
5. Error: pickUpErrorFromReturnCode (@test-gecko.R#44)
6. Error: pickUpErrorFromPortInUse (@test-gecko.R#63)
7. Error: canCallIEDriver (@test-iedriver.R#4)
8. Error: pickUpErrorFromReturnCode (@test-iedriver.R#46)
9. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68)
1. ...
Error: testthat unit tests failed
Execution halted
Flavor: r-release-osx-x86_64
Version: 0.2.2
Check: tests
Result: ERROR
Running 'testthat.R' [6s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(wdman)
>
> test_check("wdman")
-- 1. Error: canCallChrome (@test-chrome.R#3) ---------------------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = binman_process_yaml, `binman::list_versions` = mock_binman_list_versions_chrome,
`binman::app_dir` = mock_binman_app_dir, `base::normalizePath` = mock_base_normalizePath,
`base::list.files` = mock_base_list.files, `subprocess::spawn_process` = mock_subprocess_spawn_process,
`subprocess::process_return_code` = mock_subprocess_process_return_code, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, {
cDrv <- chrome()
retCommand <- chrome(retcommand = TRUE)
expect_identical(cDrv$output(), "infun")
expect_identical(cDrv$error(), "infun")
logOut <- cDrv$log()[["stdout"]]
logErr <- cDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(cDrv$stop(), "stopped")
}) at testthat/test-chrome.R:3
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: pickUpErrorFromReturnCode (@test-chrome.R#43) --------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_chrome, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(chrome(version = "2.24"), "Chromedriver couldn't be started")
}) at testthat/test-chrome.R:43
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: pickUpErrorFromPortInUse (@test-chrome.R#62) ---------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_chrome, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address already in use")
}, {
expect_error(chrome(version = "2.24"), "Chrome Driver signals port")
}) at testthat/test-chrome.R:62
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: canCallGecko (@test-gecko.R#4) -----------------------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `wdman:::generic_start_log` = mock_generic_start_log,
`wdman:::infun_read` = function(...) {
"infun"
}, {
gDrv <- gecko()
retCommand <- gecko(retcommand = TRUE)
expect_identical(gDrv$output(), "infun")
expect_identical(gDrv$error(), "infun")
logOut <- gDrv$log()[["stdout"]]
logErr <- gDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(gDrv$stop(), "stopped")
}) at testthat/test-gecko.R:4
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: pickUpErrorFromReturnCode (@test-gecko.R#44) ---------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(gecko(version = "0.11.0"), "Geckodriver couldn't be started")
}) at testthat/test-gecko.R:44
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: pickUpErrorFromPortInUse (@test-gecko.R#63) ----------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_gecko, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address in use")
}, {
expect_error(gecko(version = "0.11.0"), "Gecko Driver signals port")
}) at testthat/test-gecko.R:63
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: canCallIEDriver (@test-iedriver.R#4) -----------------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, {
ieDrv <- iedriver()
retCommand <- iedriver(retcommand = TRUE)
expect_identical(ieDrv$output(), "infun")
expect_identical(ieDrv$error(), "infun")
logOut <- ieDrv$log()[["stdout"]]
logErr <- ieDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(ieDrv$stop(), "stopped")
}) at testthat/test-iedriver.R:4
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: pickUpErrorFromReturnCode (@test-iedriver.R#46) ------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
`base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, {
expect_error(iedriver(version = "3.0.0"), "iedriver couldn't be started")
}) at testthat/test-iedriver.R:46
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. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68) -------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_iedriver, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address in use")
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, {
expect_error(iedriver(version = "3.0.0"), "IE Driver signals port")
}) at testthat/test-iedriver.R:68
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)
-- 10. Error: canCallPhantomJS (@test-phantom.R#4) ----------------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_kill` = mock_subprocess_process_kill, `wdman:::generic_start_log` = mock_generic_start_log,
`wdman:::infun_read` = function(...) {
"infun"
}, {
pDrv <- phantomjs(version = "latest")
retCommand <- phantomjs(version = "latest", retcommand = TRUE)
expect_identical(pDrv$output(), "infun")
expect_identical(pDrv$error(), "infun")
logOut <- pDrv$log()[["stdout"]]
logErr <- pDrv$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(pDrv$stop(), "stopped")
}) at testthat/test-phantom.R:4
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)
-- 11. Error: pickUpErrorFromReturnCode (@test-phantom.R#44) ------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
{
expect_error(phantomjs(version = "2.1.1"), "PhantomJS couldn't be started")
}) at testthat/test-phantom.R:44
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)
-- 12. Error: pickUpErrorFromPortInUse (@test-phantom.R#63) -------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_phantomjs, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stdout = "GhostDriver - main.fail.*sourceURL")
}, {
expect_error(phantomjs(version = "2.1.1"), "PhantomJS signals port")
}) at testthat/test-phantom.R:63
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)
-- 13. Error: canCallSelenium (@test-selenium.R#4) ----------------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = mock_generic_start_log, `wdman:::infun_read` = function(...) {
"infun"
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, {
selServ <- selenium(iedrver = "latest")
retCommand <- selenium(iedrver = "latest", retcommand = TRUE)
expect_identical(selServ$output(), "infun")
expect_identical(selServ$error(), "infun")
logOut <- selServ$log()[["stdout"]]
logErr <- selServ$log()[["stderr"]]
expect_identical(logOut, "super duper")
expect_identical(logErr, "no error here")
expect_identical(selServ$stop(), "stopped")
}) at testthat/test-selenium.R:4
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)
-- 14. Error: errorIfJavaNotFound (@test-selenium.R#75) -----------------------
Can't mock functions in base packages (base)
1: with_mock(`base::Sys.which` = function(...) {
""
}, expect_error(selenium(), "PATH to JAVA not found")) at testthat/test-selenium.R:75
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)
-- 15. Error: errorIfVersionNotFound (@test-selenium.R#82) --------------------
Can't mock functions in base packages (base)
1: with_mock(`base::Sys.which` = function(...) {
"im here"
}, `binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, expect_error(selenium(version = "nothere"),
"version requested doesnt match versions available")) at testthat/test-selenium.R:82
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)
-- 16. Error: pickUpErrorFromReturnCode (@test-selenium.R#92) -----------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = function(...) {
"some error"
}, `subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = mock_generic_start_log,
`base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_error(selenium(version = "3.0.1", iedrver = "latest"), "Selenium server couldn't be started")) at testthat/test-selenium.R:92
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)
-- 17. Error: pickUpErrorFromPortInUse (@test-selenium.R#140) -----------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `subprocess::process_kill` = mock_subprocess_process_kill,
`wdman:::generic_start_log` = function(...) {
list(stderr = "Address already in use")
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_error(selenium(), "Selenium server signals port")) at testthat/test-selenium.R:140
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)
-- 18. Error: pickUpWarningOnNoStderr (@test-selenium.R#191) ------------------
Can't mock functions in base packages (base)
1: with_mock(`binman::process_yaml` = function(...) {
}, `binman::list_versions` = mock_binman_list_versions_selenium, `binman::app_dir` = mock_binman_app_dir,
`base::normalizePath` = mock_base_normalizePath, `base::list.files` = mock_base_list.files,
`subprocess::spawn_process` = mock_subprocess_spawn_process, `subprocess::process_return_code` = mock_subprocess_process_return_code,
`subprocess::process_read` = mock_subprocess_process_read_selenium, `wdman:::generic_start_log` = function(...) {
list(stdout = character(), stderr = character())
}, `base::Sys.info` = function(...) {
structure("Windows", .Names = "sysname")
}, `wdman:::chrome_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::chrome_ver` = function(...) {
list(path = "some.path")
}, `wdman:::gecko_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::gecko_ver` = function(...) {
list(path = "some.path")
}, `wdman:::phantom_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::phantom_ver` = function(...) {
list(path = "some.path")
}, `wdman:::ie_check` = function(...) {
list(platform = "some.plat")
}, `wdman:::ie_ver` = function(...) {
list(path = "some.path")
}, expect_warning(selenium(), "No output to stderr yet detected")) at testthat/test-selenium.R:191
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)
== testthat results ===========================================================
OK: 26 SKIPPED: 0 FAILED: 18
1. Error: canCallChrome (@test-chrome.R#3)
2. Error: pickUpErrorFromReturnCode (@test-chrome.R#43)
3. Error: pickUpErrorFromPortInUse (@test-chrome.R#62)
4. Error: canCallGecko (@test-gecko.R#4)
5. Error: pickUpErrorFromReturnCode (@test-gecko.R#44)
6. Error: pickUpErrorFromPortInUse (@test-gecko.R#63)
7. Error: canCallIEDriver (@test-iedriver.R#4)
8. Error: pickUpErrorFromReturnCode (@test-iedriver.R#46)
9. Error: pickUpErrorFromPortInUse (@test-iedriver.R#68)
1. ...
Error: testthat unit tests failed
Execution halted
Flavor: r-oldrel-windows-ix86+x86_64