Running ‘test-all.R’ [46s/52s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > 
  > library(testthat)
  > 
  > test_check("mudata2")
  Loading required package: mudata2
  
  Attaching package: 'mudata2'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  ── 1. Error: read/write JSON functions work (@test_mudata.io.R#180)  ───────────
  is.character(x) is not TRUE
  1: test_json(subset(kentvillegreenwood, params = c("maxtemp", "mintemp", "meantemp"))) at testthat/test_mudata.io.R:180
  2: read_mudata_json(outfile) at testthat/test_mudata.io.R:161
  3: read_mudata_json_common(jsonlite::read_json, path = filename, validate = validate, 
         ...)
  4: read_common(obj, mudata_tbls, metadata, type_strs, validate = validate)
  5: lapply(intersect(mudata_tbls, names(obj)), function(tbl_name) {
         type_str <- type_strs[[tbl_name]]
         if (is.null(type_str)) {
             type_str <- NA_character_
         }
         mudata_parse_tbl(obj[[tbl_name]], type_str = type_str)
     }) %>% stats::setNames(intersect(mudata_tbls, names(obj)))
  6: eval(lhs, parent, parent)
  7: eval(lhs, parent, parent)
  8: lapply(intersect(mudata_tbls, names(obj)), function(tbl_name) {
         type_str <- type_strs[[tbl_name]]
         if (is.null(type_str)) {
             type_str <- NA_character_
         }
         mudata_parse_tbl(obj[[tbl_name]], type_str = type_str)
     })
  9: FUN(X[[i]], ...)
  10: mudata_parse_tbl(obj[[tbl_name]], type_str = type_str)
  11: lapply(names(x), function(col_name) {
         mudata_parse_column(x[[col_name]], type_str = type_str[col_name], ...)
     }) %>% stats::setNames(names(x)) %>% tibble::as_tibble()
  12: eval(lhs, parent, parent)
  13: eval(lhs, parent, parent)
  14: lapply(names(x), function(col_name) {
         mudata_parse_column(x[[col_name]], type_str = type_str[col_name], ...)
     })
  15: FUN(X[[i]], ...)
  16: mudata_parse_column(x[[col_name]], type_str = type_str[col_name], ...)
  17: as_parser(type_str)(x, ...)
  18: do.call(parse_fun, c(list(x), type_obj$args))
  19: (function (x, na = c("", "NA"), locale = default_locale(), trim_ws = TRUE) 
     {
         parse_vector(x, col_character(), na = na, locale = locale, trim_ws = trim_ws)
     })(c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
     NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA))
  20: parse_vector(x, col_character(), na = na, locale = locale, trim_ws = trim_ws)
  21: stopifnot(is.character(x))
  
  ── 2. Error: mudata_prepare_column and mudata_parse_column are opposites (@test_
  is.character(x) is not TRUE
  1: mapply(mudata_parse_column, prepared, type_strs, SIMPLIFY = FALSE) at testthat/test_mudata.io.R:267
  2: (function (x, type_str = NA_character_, ...) 
     {
         if (inherits(x, parse_output_class(type_str))) {
             x
         }
         else {
             as_parser(type_str)(x, ...)
         }
     })(dots[[1L]][[4L]], dots[[2L]][[4L]])
  3: as_parser(type_str)(x, ...)
  4: do.call(parse_fun, c(list(x), type_obj$args))
  5: (function (x, na = c("", "NA"), locale = default_locale(), trim_ws = TRUE) 
     {
         parse_vector(x, col_character(), na = na, locale = locale, trim_ws = trim_ws)
     })(structure(1:3, .Label = c("one", "two", "three"), class = "factor"))
  6: parse_vector(x, col_character(), na = na, locale = locale, trim_ws = trim_ws)
  7: stopifnot(is.character(x))
  
  ── 3. Error: mudata_prepare_tbl and mudata_parse_tbl are opposites (@test_mudata
  is.character(x) is not TRUE
  1: mudata_parse_tbl(prepared, type_str = type_strs) at testthat/test_mudata.io.R:344
  2: lapply(names(x), function(col_name) {
         mudata_parse_column(x[[col_name]], type_str = type_str[col_name], ...)
     }) %>% stats::setNames(names(x)) %>% tibble::as_tibble()
  3: eval(lhs, parent, parent)
  4: eval(lhs, parent, parent)
  5: lapply(names(x), function(col_name) {
         mudata_parse_column(x[[col_name]], type_str = type_str[col_name], ...)
     })
  6: FUN(X[[i]], ...)
  7: mudata_parse_column(x[[col_name]], type_str = type_str[col_name], ...)
  8: as_parser(type_str)(x, ...)
  9: do.call(parse_fun, c(list(x), type_obj$args))
  10: (function (x, na = c("", "NA"), locale = default_locale(), trim_ws = TRUE) 
     {
         parse_vector(x, col_character(), na = na, locale = locale, trim_ws = trim_ws)
     })(structure(1:3, .Label = c("one", "two", "three"), class = "factor"))
  11: parse_vector(x, col_character(), na = na, locale = locale, trim_ws = trim_ws)
  12: stopifnot(is.character(x))
  
  ── 4. Error: read/write mudatas containing datetime objects works (@test_mudata.
  is.character(x) is not TRUE
  1: expect_equal_mudata(slt, read_mudata(outfile)) at testthat/test_mudata.io.R:431
  2: dplyr::collect(md2) at testthat/test_mudata.io.R:7
  3: read_mudata(outfile) at testthat/test_mudata.io.R:7
  4: read_mudata_json(filename, ...)
  5: read_mudata_json_common(jsonlite::read_json, path = filename, validate = validate, 
         ...)
  6: read_common(obj, mudata_tbls, metadata, type_strs, validate = validate)
  7: lapply(intersect(mudata_tbls, names(obj)), function(tbl_name) {
         type_str <- type_strs[[tbl_name]]
         if (is.null(type_str)) {
             type_str <- NA_character_
         }
         mudata_parse_tbl(obj[[tbl_name]], type_str = type_str)
     }) %>% stats::setNames(intersect(mudata_tbls, names(obj)))
  8: eval(lhs, parent, parent)
  9: eval(lhs, parent, parent)
  10: lapply(intersect(mudata_tbls, names(obj)), function(tbl_name) {
         type_str <- type_strs[[tbl_name]]
         if (is.null(type_str)) {
             type_str <- NA_character_
         }
         mudata_parse_tbl(obj[[tbl_name]], type_str = type_str)
     })
  ...
  14: eval(lhs, parent, parent)
  15: eval(lhs, parent, parent)
  16: lapply(names(x), function(col_name) {
         mudata_parse_column(x[[col_name]], type_str = type_str[col_name], ...)
     })
  17: FUN(X[[i]], ...)
  18: mudata_parse_column(x[[col_name]], type_str = type_str[col_name], ...)
  19: as_parser(type_str)(x, ...)
  20: do.call(parse_fun, c(list(x), type_obj$args))
  21: (function (x, na = c("", "NA"), locale = default_locale(), trim_ws = TRUE) 
     {
         parse_vector(x, col_double(), na = na, locale = locale, trim_ws = trim_ws)
     })(2014L)
  22: parse_vector(x, col_double(), na = na, locale = locale, trim_ws = trim_ws)
  23: stopifnot(is.character(x))
  
  OGR: Unsupported geometry type
  OGR: Unsupported geometry type
  OGR: Unsupported geometry type
  OGR: Unsupported geometry type
  OGR: Unsupported geometry type
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 805 SKIPPED: 0 FAILED: 4
  1. Error: read/write JSON functions work (@test_mudata.io.R#180) 
  2. Error: mudata_prepare_column and mudata_parse_column are opposites (@test_mudata.io.R#267) 
  3. Error: mudata_prepare_tbl and mudata_parse_tbl are opposites (@test_mudata.io.R#344) 
  4. Error: read/write mudatas containing datetime objects works (@test_mudata.io.R#431) 
  
  Error: testthat unit tests failed
  Execution halted