Running ‘testthat.R’ [2s/80s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(WikidataR)
  > 
  > test_check("WikidataR")
  ── 1. Error: Simple entity-based geo lookups work (@test_geo.R#5)  ─────────────
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: get_geo_entity("Q62") at testthat/test_geo.R:5
  2: clean_geo(sparql_query(query)$results$bindings)
  3: 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))
     }))
  4: 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))
     })
  5: sparql_query(query)
  6: httr::GET("https://query.wikidata.org/bigdata/namespace/wdq/sparql", query = list(query = params), 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  7: request_perform(req, hu$handle$handle)
  8: request_fetch(req$output, req$url, handle)
  9: request_fetch.write_memory(req$output, req$url, handle)
  10: curl::curl_fetch_memory(url, handle = handle)
  
  ── 2. Error: Language-variant entity-based geo lookups work (@test_geo.R#13)  ──
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: get_geo_entity("Q62", language = "fr") at testthat/test_geo.R:13
  2: clean_geo(sparql_query(query)$results$bindings)
  3: 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))
     }))
  4: 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))
     })
  5: sparql_query(query)
  6: httr::GET("https://query.wikidata.org/bigdata/namespace/wdq/sparql", query = list(query = params), 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  7: request_perform(req, hu$handle$handle)
  8: request_fetch(req$output, req$url, handle)
  9: request_fetch.write_memory(req$output, req$url, handle)
  10: curl::curl_fetch_memory(url, handle = handle)
  
  ── 3. Error: Radius restricted entity-based geo lookups work (@test_geo.R#21)  ─
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: get_geo_entity("Q62", radius = 1) at testthat/test_geo.R:21
  2: clean_geo(sparql_query(query)$results$bindings)
  3: 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))
     }))
  4: 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))
     })
  5: sparql_query(query)
  6: httr::GET("https://query.wikidata.org/bigdata/namespace/wdq/sparql", query = list(query = params), 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  7: request_perform(req, hu$handle$handle)
  8: request_fetch(req$output, req$url, handle)
  9: request_fetch.write_memory(req$output, req$url, handle)
  10: curl::curl_fetch_memory(url, handle = handle)
  
  ── 4. Error: multi-entity geo lookups work (@test_geo.R#29)  ───────────────────
  Timeout was reached: Connection timed out after 10001 milliseconds
  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::GET("https://query.wikidata.org/bigdata/namespace/wdq/sparql", query = list(query = params), 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  10: request_perform(req, hu$handle$handle)
  11: request_fetch(req$output, req$url, handle)
  12: request_fetch.write_memory(req$output, req$url, handle)
  13: curl::curl_fetch_memory(url, handle = handle)
  
  ── 5. Error: Simple bounding lookups work (@test_geo.R#37)  ────────────────────
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: get_geo_box("Q12988", "NorthEast", "Q184287", "SouthWest") at testthat/test_geo.R:37
  2: clean_geo(sparql_query(query)$results$bindings)
  3: 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))
     }))
  4: 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))
     })
  5: sparql_query(query)
  6: httr::GET("https://query.wikidata.org/bigdata/namespace/wdq/sparql", query = list(query = params), 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  7: request_perform(req, hu$handle$handle)
  8: request_fetch(req$output, req$url, handle)
  9: request_fetch.write_memory(req$output, req$url, handle)
  10: curl::curl_fetch_memory(url, handle = handle)
  
  ── 6. Error: Language-variant bounding lookups work (@test_geo.R#44)  ──────────
  Timeout was reached: Operation timed out after 10001 milliseconds with 0 out of 0 bytes received
  1: get_geo_box("Q12988", "NorthEast", "Q184287", "SouthWest", language = "fr") at testthat/test_geo.R:44
  2: clean_geo(sparql_query(query)$results$bindings)
  3: 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))
     }))
  4: 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))
     })
  5: sparql_query(query)
  6: httr::GET("https://query.wikidata.org/bigdata/namespace/wdq/sparql", query = list(query = params), 
         httr::user_agent("WikidataR - https://github.com/Ironholds/WikidataR"), ...)
  7: request_perform(req, hu$handle$handle)
  8: request_fetch(req$output, req$url, handle)
  9: request_fetch.write_memory(req$output, req$url, handle)
  10: curl::curl_fetch_memory(url, handle = handle)
  
  ── 7. Error: A specific item can be retrieved with an entire item code (@test_ge
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: expect_true({
         get_item("Q100")
         TRUE
     }) at testthat/test_gets.R:4
  2: quasi_label(enquo(object), label, arg = "object")
  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::GET(url, query = query_param, httr::user_agent("WikipediR - https://github.com/Ironholds/WikipediR"), 
         ...)
  10: request_perform(req, hu$handle$handle)
  11: request_fetch(req$output, req$url, handle)
  12: request_fetch.write_memory(req$output, req$url, handle)
  13: curl::curl_fetch_memory(url, handle = handle)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 10 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 7 ]
  1. Error: Simple entity-based geo lookups work (@test_geo.R#5) 
  2. Error: Language-variant entity-based geo lookups work (@test_geo.R#13) 
  3. Error: Radius restricted entity-based geo lookups work (@test_geo.R#21) 
  4. Error: multi-entity geo lookups work (@test_geo.R#29) 
  5. Error: Simple bounding lookups work (@test_geo.R#37) 
  6. Error: Language-variant bounding lookups work (@test_geo.R#44) 
  7. Error: A specific item can be retrieved with an entire item code (@test_gets.R#4) 
  
  Error: testthat unit tests failed
  Execution halted