Running ‘testthat.R’ [64s/73s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(jpndistrict)
  Loading required package: jpmesh
  This package provide map data is based on the Digital Map 25000 (Map
  Image) published by Geospatial Information Authority of Japan (Approval
  No.603FY2017 information usage <http://www.gsi.go.jp>)
  > 
  > test_check("jpndistrict")
  trying URL 'http://nlftp.mlit.go.jp/ksj/gml/data/P34/P34-14/P34-14_47_GML.zip'
  Content type 'text/html' length 773 bytes
  ==================================================
  downloaded 773 bytes
  
  options:        ENCODING=cp932 
  Cannot open data source /tmp/RtmpVJNYYS/P34-14_47_GML
  ── 1. Error: Collect administration offices data (@test-spdf_jpn.R#92)  ────────
  Open failed.
  1: jpn_admins(jis_code = 47) at testthat/test-spdf_jpn.R:92
  2: jis_code %>% purrr::map_chr(~substr(.x, 1, 2)) %>% unique() %>% purrr::map(~read_ksj_p34(pref_code = as.numeric(.x))) %>% 
         purrr::reduce(rbind)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: function_list[[i]](value)
  9: purrr::map(., ~read_ksj_p34(pref_code = as.numeric(.x)))
  10: .f(.x[[i]], ...)
  11: read_ksj_p34(pref_code = as.numeric(.x))
  12: collect_ksj_p34(path = path)
  13: sf::st_read(paste0(path, "/", list.files(path, pattern = paste0(code, ".shp$"))), 
         stringsAsFactors = FALSE, options = c(paste0("ENCODING=", dplyr::if_else(tolower(Sys.info()[["sysname"]]) == 
             "windows", "UTF8", "cp932")))) %>% magrittr::set_colnames(c("jis_code", "type", 
         "name", "address", "geometry")) %>% dplyr::mutate(jis_code = as.factor(jis_code))
  14: eval(lhs, parent, parent)
  15: eval(lhs, parent, parent)
  16: sf::st_read(paste0(path, "/", list.files(path, pattern = paste0(code, ".shp$"))), 
         stringsAsFactors = FALSE, options = c(paste0("ENCODING=", dplyr::if_else(tolower(Sys.info()[["sysname"]]) == 
             "windows", "UTF8", "cp932"))))
  17: st_read.character(paste0(path, "/", list.files(path, pattern = paste0(code, ".shp$"))), 
         stringsAsFactors = FALSE, options = c(paste0("ENCODING=", dplyr::if_else(tolower(Sys.info()[["sysname"]]) == 
             "windows", "UTF8", "cp932"))))
  18: CPL_read_ogr(dsn, layer, query, as.character(options), quiet, type, promote_to_multi, 
         int64_as_string)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 64 SKIPPED: 1 FAILED: 1
  1. Error: Collect administration offices data (@test-spdf_jpn.R#92) 
  
  Error: testthat unit tests failed
  Execution halted