Running ‘testthat.R’ [17s/21s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(taxa)
  
  Attaching package: 'taxa'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  > 
  > test_check("taxa")
  ── 1. Error: Taxmap can be intialized from queried data (@test--taxmap_parsers.R
  '{"error":"API key invalid","api-key":"","type":"invalid","status":"unknown"}' does not exist in current working directory ('/home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/taxa.Rcheck/tests/testthat').
  1: lookup_tax_data(raw_data, type = "taxon_name", datasets = list(counts = abundance, 
         my_names = common_names, foods = foods), mappings = c(species_id = "id", species_id = "{{name}}", 
         `{{index}}` = "{{index}}"), column = "species") at testthat/test--taxmap_parsers.R:106
  2: lookup_funcs[[type]](query)
  3: map_unique(names, taxize::classification, ask = TRUE, db = database)
  4: func(unique_input, ...)
  5: classification.default(unique_input, ...)
  6: process_ids(x, db, get_uid, rows = rows, ...)
  7: eval(fxn)(input, ...)
  8: ldply(sciname, fun, ask, messages, rows, ...)
  9: llply(.data = .data, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts)
  10: structure(lapply(pieces, .fun, ...), dim = dim(pieces))
  11: lapply(pieces, .fun, ...)
  12: FUN(X[[i]], ...)
  13: xml2::read_xml(repeat_until_it_works(errors_to_catch, "esearch", query = list(db = "taxonomy", 
         term = term, api_key = key), ...))
  14: read_xml.character(repeat_until_it_works(errors_to_catch, "esearch", query = list(db = "taxonomy", 
         term = term, api_key = key), ...))
  15: path_to_connection(x)
  16: check_path(path)
  17: stop("'", path, "' does not exist", if (!is_absolute_path(path)) paste0(" in current working directory ('", 
         getwd(), "')"), ".", call. = FALSE)
  
  ── 2. Error: Taxmap can be intialized from raw strings (@test--taxmap_parsers.R#
  Bad Request (HTTP 400)
  1: extract_tax_data(raw_data, key = c(var_1 = "info", var_2 = "taxon_id", tax = "info"), 
         regex = "^>var_1:(.+)--var_2:(.+)--non_target--tax:(.+)$") at testthat/test--taxmap_parsers.R:167
  2: lookup_tax_data(tax_data = parsed_input, type = my_type, column = names(my_type), 
         database = database, include_tax_data = include_tax_data)
  3: lookup_funcs[[type]](query)
  4: map_unique(ids, taxize::classification, ask = FALSE, rows = 1, db = database)
  5: func(unique_input, ...)
  6: classification.default(unique_input, ...)
  7: stats::setNames(classification(id, callopts = callopts, return_id = return_id, ...), 
         x)
  8: classification(id, callopts = callopts, return_id = return_id, ...)
  9: classification.uid(id, callopts = callopts, return_id = return_id, ...)
  10: lapply(id, fun, callopts = callopts)
  11: FUN(X[[i]], ...)
  12: res$raise_for_status()
  13: stop(sprintf("%s (HTTP %s)", x$message, x$status_code), call. = FALSE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 451 SKIPPED: 0 FAILED: 2
  1. Error: Taxmap can be intialized from queried data (@test--taxmap_parsers.R#106) 
  2. Error: Taxmap can be intialized from raw strings (@test--taxmap_parsers.R#167) 
  
  Error: testthat unit tests failed
  Execution halted