Running ‘testthat.R’ [4s/7s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(WikidataR)
  > 
  > test_check("WikidataR")
  ── 1. Error: multi-entity geo lookups work (@test_geo.R#29)  ───────────────────
  Service Unavailable (HTTP 503).
  1: get_geo_entity(c("Q62", "Q64"), radius = 1) at testthat/test_geo.R:29
  2: do.call("rbind", mapply(function(query, entity, ...) {
         output <- clean_geo(sparql_query(query, ...)$results$bindings)
         output$entity <- entity
         return(output)
     }, query = query, entity = entity, ..., SIMPLIFY = FALSE))
  3: mapply(function(query, entity, ...) {
         output <- clean_geo(sparql_query(query, ...)$results$bindings)
         output$entity <- entity
         return(output)
     }, query = query, entity = entity, ..., SIMPLIFY = FALSE)
  4: (function (query, entity, ...) 
     {
         output <- clean_geo(sparql_query(query, ...)$results$bindings)
         output$entity <- entity
         return(output)
     })(query = dots[[1L]][[1L]], entity = dots[[2L]][[1L]])
  5: clean_geo(sparql_query(query, ...)$results$bindings)
  6: do.call("rbind", lapply(results, function(item) {
         point <- unlist(strsplit(gsub(x = item$coord$value, pattern = "(Point\\(|\\))", 
             replacement = ""), " "))
         wd_id <- gsub(x = item$item$value, pattern = "http://www.wikidata.org/entity/", 
             replacement = "", fixed = TRUE)
         return(data.frame(item = wd_id, name = ifelse(item$name$value == wd_id, NA, item$name$value), 
             latitutde = as.numeric(point[1]), longitude = as.numeric(point[2]), stringsAsFactors = FALSE))
     }))
  7: lapply(results, function(item) {
         point <- unlist(strsplit(gsub(x = item$coord$value, pattern = "(Point\\(|\\))", 
             replacement = ""), " "))
         wd_id <- gsub(x = item$item$value, pattern = "http://www.wikidata.org/entity/", 
             replacement = "", fixed = TRUE)
         return(data.frame(item = wd_id, name = ifelse(item$name$value == wd_id, NA, item$name$value), 
             latitutde = as.numeric(point[1]), longitude = as.numeric(point[2]), stringsAsFactors = FALSE))
     })
  8: sparql_query(query, ...)
  9: httr::stop_for_status(result)
  
  ── 2. Error: A specific item can be retrieved with an entire item code (@test_ge
  Service Unavailable (HTTP 503).
  1: expect_true({
         get_item("Q100")
         TRUE
     }) at testthat/test_gets.R:4
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_item("Q100") at testthat/test_gets.R:4
  5: lapply(id, wd_query, ...)
  6: FUN(X[[i]], ...)
  7: WikipediR::page_content(domain = "wikidata.org", page_name = title, as_wikitext = TRUE, 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  8: query(url, "pcontent", clean_response, query_param = query_param, ...)
  9: httr::stop_for_status(response)
  
  ── 3. Error: A specific item can be retrieved with a partial entire item code (@
  Service Unavailable (HTTP 503).
  1: expect_true({
         get_item("100")
         TRUE
     }) at testthat/test_gets.R:8
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_item("100") at testthat/test_gets.R:8
  5: lapply(id, wd_query, ...)
  6: FUN(X[[i]], ...)
  7: WikipediR::page_content(domain = "wikidata.org", page_name = title, as_wikitext = TRUE, 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  8: query(url, "pcontent", clean_response, query_param = query_param, ...)
  9: httr::stop_for_status(response)
  
  ── 4. Error: A specific property can be retrieved with an entire prop code + nam
  Service Unavailable (HTTP 503).
  1: expect_true({
         get_property("Property:P10")
         TRUE
     }) at testthat/test_gets.R:12
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_property("Property:P10") at testthat/test_gets.R:12
  5: lapply(id, wd_query, ...)
  6: FUN(X[[i]], ...)
  7: WikipediR::page_content(domain = "wikidata.org", page_name = title, as_wikitext = TRUE, 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  8: query(url, "pcontent", clean_response, query_param = query_param, ...)
  9: httr::stop_for_status(response)
  
  ── 5. Error: A specific property can be retrieved with an entire prop code + nam
  Service Unavailable (HTTP 503).
  1: expect_true({
         get_property("P10")
         TRUE
     }) at testthat/test_gets.R:16
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_property("P10") at testthat/test_gets.R:16
  5: lapply(id, wd_query, ...)
  6: FUN(X[[i]], ...)
  7: WikipediR::page_content(domain = "wikidata.org", page_name = title, as_wikitext = TRUE, 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  8: query(url, "pcontent", clean_response, query_param = query_param, ...)
  9: httr::stop_for_status(response)
  
  ── 6. Error: A specific property can be retrieved with a partial prop code (@tes
  Service Unavailable (HTTP 503).
  1: expect_true({
         get_property("10")
         TRUE
     }) at testthat/test_gets.R:21
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_property("10") at testthat/test_gets.R:21
  5: lapply(id, wd_query, ...)
  6: FUN(X[[i]], ...)
  7: WikipediR::page_content(domain = "wikidata.org", page_name = title, as_wikitext = TRUE, 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  8: query(url, "pcontent", clean_response, query_param = query_param, ...)
  9: httr::stop_for_status(response)
  
  ── 7. Error: A randomly-selected item can be retrieved (@test_gets.R#25)  ──────
  Service Unavailable (HTTP 503).
  1: expect_true({
         get_random_item()
         TRUE
     }) at testthat/test_gets.R:25
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_random_item() at testthat/test_gets.R:25
  5: wd_rand_query(ns = 0, limit = limit, ...)
  6: WikipediR::random_page(domain = "wikidata.org", as_wikitext = TRUE, namespaces = ns, 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), limit = limit, 
         ...)
  7: query(url, NULL, FALSE, query_param = query_param)
  8: httr::stop_for_status(response)
  
  ── 8. Error: A randomly-selected property can be retriveed (@test_gets.R#29)  ──
  Service Unavailable (HTTP 503).
  1: expect_true({
         get_random_property()
         TRUE
     }) at testthat/test_gets.R:29
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_random_property() at testthat/test_gets.R:29
  5: wd_rand_query(ns = 120, limit = limit, ...)
  6: WikipediR::random_page(domain = "wikidata.org", as_wikitext = TRUE, namespaces = ns, 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), limit = limit, 
         ...)
  7: query(url, NULL, FALSE, query_param = query_param)
  8: httr::stop_for_status(response)
  
  ── 9. Error: English-language search works (@test_search.R#4)  ─────────────────
  Service Unavailable (HTTP 503).
  1: expect_true({
         find_item("Wonder Girls", "en")
         TRUE
     }) at testthat/test_search.R:4
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: find_item("Wonder Girls", "en") at testthat/test_search.R:4
  5: searcher(search_term, language, limit, "item")
  6: WikipediR::query(url = "https://www.wikidata.org/w/api.php", out_class = "list", 
         clean_response = FALSE, query_param = list(action = "wbsearchentities", type = type, 
             language = language, limit = limit, search = search_term), ...)
  7: httr::stop_for_status(response)
  
  ── 10. Error: Non-English-language search works (@test_search.R#8)  ────────────
  Service Unavailable (HTTP 503).
  1: expect_true({
         find_item("Wonder Girls", "es")
         TRUE
     }) at testthat/test_search.R:8
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: find_item("Wonder Girls", "es") at testthat/test_search.R:8
  5: searcher(search_term, language, limit, "item")
  6: WikipediR::query(url = "https://www.wikidata.org/w/api.php", out_class = "list", 
         clean_response = FALSE, query_param = list(action = "wbsearchentities", type = type, 
             language = language, limit = limit, search = search_term), ...)
  7: httr::stop_for_status(response)
  
  ── 11. Error: Search with limit modding works (@test_search.R#12)  ─────────────
  Service Unavailable (HTTP 503).
  1: expect_that(length(find_item("Wonder Girls", "en", 3)), equals(3)) at testthat/test_search.R:12
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: find_item("Wonder Girls", "en", 3)
  7: searcher(search_term, language, limit, "item")
  8: WikipediR::query(url = "https://www.wikidata.org/w/api.php", out_class = "list", 
         clean_response = FALSE, query_param = list(action = "wbsearchentities", type = type, 
             language = language, limit = limit, search = search_term), ...)
  9: httr::stop_for_status(response)
  
  ── 12. Error: Property search works (@test_search.R#16)  ───────────────────────
  Service Unavailable (HTTP 503).
  1: expect_true({
         find_property("Music", "en")
         TRUE
     }) at testthat/test_search.R:16
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: find_property("Music", "en") at testthat/test_search.R:16
  5: searcher(search_term, language, limit, "property")
  6: WikipediR::query(url = "https://www.wikidata.org/w/api.php", out_class = "list", 
         clean_response = FALSE, query_param = list(action = "wbsearchentities", type = type, 
             language = language, limit = limit, search = search_term), ...)
  7: httr::stop_for_status(response)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 13 SKIPPED: 0 FAILED: 12
  1. Error: multi-entity geo lookups work (@test_geo.R#29) 
  2. Error: A specific item can be retrieved with an entire item code (@test_gets.R#4) 
  3. Error: A specific item can be retrieved with a partial entire item code (@test_gets.R#8) 
  4. Error: A specific property can be retrieved with an entire prop code + namespace (@test_gets.R#12) 
  5. Error: A specific property can be retrieved with an entire prop code + namespace (@test_gets.R#16) 
  6. Error: A specific property can be retrieved with a partial prop code (@test_gets.R#21) 
  7. Error: A randomly-selected item can be retrieved (@test_gets.R#25) 
  8. Error: A randomly-selected property can be retriveed (@test_gets.R#29) 
  9. Error: English-language search works (@test_search.R#4) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted