Running ‘testthat.R’ [12s/26s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > 
  > all.pkgs <- c("testthat", "dplyr", "dtplyr", "data.table", "magrittr", "survey", "zoo")
  > 
  > 
  > if (all(vapply(all.pkgs, requireNamespace, logical(1L), quietly = TRUE))) {
  +   
  +   library(testthat)
  +   library(grattan)
  +   library(dplyr)
  +   library(dtplyr)
  +   library(hutils)
  +   library(data.table)
  +   
  +   if (requireNamespace("taxstats", quietly = TRUE)) {
  +     
  +     library(taxstats)
  +     sample_files_all <-
  +       rbindlist(lapply(list(`2003-04` = sample_file_0304,
  +                             `2004-05` = sample_file_0405, `2005-06` = sample_file_0506,
  +                             `2006-07` = sample_file_0607, `2007-08` = sample_file_0708,
  +                             `2008-09` = sample_file_0809, `2009-10` = sample_file_0910,
  +                             `2010-11` = sample_file_1011, `2011-12` = sample_file_1112,
  +                             `2012-13` = sample_file_1213, `2013-14` = sample_file_1314),
  +                        data.table::as.data.table),
  +                 use.names = TRUE,
  +                 fill = TRUE,
  +                 idcol = "fy.year")
  +     sample_files_all[, WEIGHT := hutils::if_else(fy.year > '2010-11', 50L, 100L)]
  +   }
  +   
  +   library(magrittr)
  +   library(survey)
  +   library(zoo)
  +   
  +   test_check("grattan")
  + }
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  
  Attaching package: 'hutils'
  
  The following objects are masked from 'package:dplyr':
  
      coalesce, if_else
  
  
  Attaching package: 'data.table'
  
  The following objects are masked from 'package:dplyr':
  
      between, first, last
  
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  Loading required package: grid
  Loading required package: Matrix
  Loading required package: survival
  
  Attaching package: 'survey'
  
  The following object is masked from 'package:graphics':
  
      dotchart
  
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  ── 1. Error: generic inflator doesn't fail! (@test_generic_inflator.R#5)  ──────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_is(generic_inflator(vars = "Sw_amt", h = 1L), "data.frame") at testthat/test_generic_inflator.R:5
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: generic_inflator(vars = "Sw_amt", h = 1L)
  5: mean_of_each_var %>% setDT %>% melt.data.table(id.vars = c("fy.year"), variable.factor = FALSE) %>% 
         .[, forecast_and_extract(fy.year, value), by = "variable"] %>% .[complete.cases(.)] %>% 
         setorderv("fy_year") %>% .[fy_year >= fy.year.of.sample.file] %>% .[, .(inflator = last_over_first(value)), 
         by = "variable"]
  6: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: eval(quote(`_fseq`(`_lhs`)), env, env)
  9: `_fseq`(`_lhs`)
  10: freduce(value, `_function_list`)
  11: function_list[[i]](value)
  12: .[, forecast_and_extract(fy.year, value), by = "variable"]
  13: `[.data.table`(., , forecast_and_extract(fy.year, value), by = "variable")
  
  ── 2. Error: generic inflator gives higher/lower for upper/lower (@test_generic_
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_gte(generic_inflator(vars = "Sw_amt", h = 1L, estimator = "mean")[["inflator"]], 
         generic_inflator(vars = "Sw_amt", h = 1L, estimator = "lower")[["inflator"]]) at testthat/test_generic_inflator.R:9
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: generic_inflator(vars = "Sw_amt", h = 1L, estimator = "mean")
  5: mean_of_each_var %>% setDT %>% melt.data.table(id.vars = c("fy.year"), variable.factor = FALSE) %>% 
         .[, forecast_and_extract(fy.year, value), by = "variable"] %>% .[complete.cases(.)] %>% 
         setorderv("fy_year") %>% .[fy_year >= fy.year.of.sample.file] %>% .[, .(inflator = last_over_first(value)), 
         by = "variable"]
  6: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: eval(quote(`_fseq`(`_lhs`)), env, env)
  9: `_fseq`(`_lhs`)
  10: freduce(value, `_function_list`)
  11: function_list[[i]](value)
  12: .[, forecast_and_extract(fy.year, value), by = "variable"]
  13: `[.data.table`(., , forecast_and_extract(fy.year, value), by = "variable")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 223 SKIPPED: 57 FAILED: 2
  1. Error: generic inflator doesn't fail! (@test_generic_inflator.R#5) 
  2. Error: generic inflator gives higher/lower for upper/lower (@test_generic_inflator.R#9) 
  
  Error: testthat unit tests failed
  Execution halted