Running ‘testthat.R’ [2s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > "data.world-r
  + Copyright 2017 data.world, Inc.
  + 
  + Licensed under the Apache License, Version 2.0 (the \"License\");
  + you may not use this file except in compliance with the License.
  + 
  + You may obtain a copy of the License at
  + http://www.apache.org/licenses/LICENSE-2.0
  + 
  + Unless required by applicable law or agreed to in writing, software
  + distributed under the License is distributed on an \"AS IS\" BASIS,
  + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  + implied. See the License for the specific language governing
  + permissions and limitations under the License.
  + 
  + This product includes software developed at data.world, Inc.
  + https://data.world"
  [1] "data.world-r\nCopyright 2017 data.world, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\n\nYou may obtain a copy of the License at\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the License for the specific language governing\npermissions and limitations under the License.\n\nThis product includes software developed at data.world, Inc.\nhttps://data.world"
  > 
  > library(testthat)
  > library(data.world)
  > 
  > test_check("data.world")
  ── 1. Error: SQL query making correct calls (@test_query.R#24)  ────────────────
  cannot open the connection
  1: testthat::with_mock(`dwapi::sql` = function(dataset, query, query_params) {
         testthat::expect_equal(dataset, dataset_key)
         testthat::expect_equal(query, sql_query)
         testthat::expect_equal(query_params, params)
         return(mock_response)
     }, {
         ret <- data.world::query(qry_sql(sql_query, params = params), dataset_key)
         testthat::expect_equal(ret, mock_response)
     }) at testthat/test_query.R:24
  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: is_base_pkg(pkg_name)
  6: x %in% rownames(utils::installed.packages(priority = "base"))
  7: rownames(utils::installed.packages(priority = "base"))
  8: utils::installed.packages(priority = "base")
  9: saveRDS(list(base = base, value = ret0), dest)
  10: gzfile(file, mode)
  
  ── 2. Error: SPARQL query making correct calls (@test_query.R#51)  ─────────────
  cannot open the connection
  1: testthat::with_mock(`dwapi::sparql` = function(dataset, query, query_params) {
         testthat::expect_equal(dataset, dataset_key)
         testthat::expect_equal(query, sql_query)
         testthat::expect_equal(query_params, params)
         return(mock_response)
     }, {
         ret <- data.world::query(qry_sparql(sql_query, params = params), dataset_key)
         testthat::expect_equal(ret, mock_response)
     }) at testthat/test_query.R:51
  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: is_base_pkg(pkg_name)
  6: x %in% rownames(utils::installed.packages(priority = "base"))
  7: rownames(utils::installed.packages(priority = "base"))
  8: utils::installed.packages(priority = "base")
  9: saveRDS(list(base = base, value = ret0), dest)
  10: gzfile(file, mode)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 19 SKIPPED: 0 FAILED: 2
  1. Error: SQL query making correct calls (@test_query.R#24) 
  2. Error: SPARQL query making correct calls (@test_query.R#51) 
  
  Error: testthat unit tests failed
  Execution halted