Running 'testthat.R' [15m]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(iNZightTools)
  
  Attaching package: 'iNZightTools'
  
  The following object is masked from 'package:stats':
  
      filter
  
  > 
  > test_check("iNZightTools")
  Loading required package: survey
  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: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  Loading required namespace: styler
  Failed with error:  '.onLoad failed in loadNamespace() for 'styler', details:
    call: file.copy(pathnameS, pathnameD)
    error: no files to copy to'
  In addition: There were 50 or more warnings (use warnings() to see the first 50)
  [ FAIL 4 | WARN 22409 | SKIP 4 | PASS 351 ]
  
  ══ Skipped tests (4) ═══════════════════════════════════════════════════════════
  • On CRAN (2): 'test_smart_read.R:27:5', 'test_smart_read.R:253:5'
  • URL not available. (1): 'test_smart_read.R:203:5'
  • surveyspec cannot be loaded (1): 'test_survey_design.R:4:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_tidy_code.R:5:5'): Cody tidying does not break code ────────────
  Error in `FUN(X[[i]], ...)`: Please install suggested package: 'styler'
  Backtrace:
       ▆
    1. └─testthat::test_check("iNZightTools")
    2.   └─testthat::test_dir(...)
    3.     └─testthat:::test_files(...)
    4.       └─testthat:::test_files_serial(...)
    5.         ├─testthat::with_reporter(...)
    6.         │ └─base::tryCatch(...)
    7.         │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    8.         │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
    9.         │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   10.         └─base::lapply(test_paths, test_one_file, env = env, wrap = wrap)
   11.           └─testthat (local) FUN(X[[i]], ...)
   12.             └─testthat::source_file(path, env(env), wrap = wrap)
   13.               └─testthat:::test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
   14.                 ├─base::tryCatch(...)
   15.                 │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   16.                 │   ├─base (local) tryCatchOne(...)
   17.                 │   │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   18.                 │   └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   19.                 │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   20.                 │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   21.                 ├─base::withCallingHandlers(...)
   22.                 └─base::eval(code, test_env)
   23.                   └─base::eval(code, test_env)
   24.                     └─testthat::test_that(...) at test_tidy_code.R:3:0
   25.                       └─testthat:::test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
   26.                         ├─base::tryCatch(...)
   27.                         │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   28.                         │   ├─base (local) tryCatchOne(...)
   29.                         │   │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   30.                         │   └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   31.                         │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   32.                         │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   33.                         ├─base::withCallingHandlers(...)
   34.                         └─base::eval(code, test_env)
   35.                           └─base::eval(code, test_env)
   36.                             └─iNZightTools::tidy_all_code(x) at test_tidy_code.R:5:4
   37.                               └─base::sapply(allcode, tidy_code, width = width, indent = indent)
   38.                                 └─base::lapply(X = X, FUN = FUN, ...)
   39.                                   └─iNZightTools (local) FUN(X[[i]], ...)
  ── Error ('test_tidy_code.R:3:1'): (code run outside of `test_that()`) ─────────
  Error in `options(old_options)`: option 'max.print' cannot be deleted
  Backtrace:
       ▆
    1. └─testthat::test_check("iNZightTools")
    2.   └─testthat::test_dir(...)
    3.     └─testthat:::test_files(...)
    4.       └─testthat:::test_files_serial(...)
    5.         ├─testthat::with_reporter(...)
    6.         │ └─base::tryCatch(...)
    7.         │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    8.         │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
    9.         │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   10.         └─base::lapply(test_paths, test_one_file, env = env, wrap = wrap)
   11.           └─testthat (local) FUN(X[[i]], ...)
   12.             └─testthat::source_file(path, env(env), wrap = wrap)
   13.               └─testthat:::test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
   14.                 ├─base::tryCatch(...)
   15.                 │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   16.                 │   ├─base (local) tryCatchOne(...)
   17.                 │   │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   18.                 │   └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   19.                 │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   20.                 │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   21.                 ├─base::withCallingHandlers(...)
   22.                 └─base::eval(code, test_env)
   23.                   └─base::eval(code, test_env)
   24.                     └─testthat::test_that(...) at test_tidy_code.R:3:0
   25.                       └─testthat:::test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
   26.                         └─testthat:::testthat_state_condition(before, after, call = sys.call(-1))
   27.                           └─testthat:::waldo_compare(before, after, x_arg = "before", y_arg = "after")
   28.                             └─withr (local) `<fn>`(`<env>`)
  ── Error (???): (code run outside of `test_that()`) ────────────────────────────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'rowSums': (converted from warning) NAs introduced by coercion
  ── Error (???): (code run outside of `test_that()`) ────────────────────────────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'rowSums': (converted from warning) NAs introduced by coercion
  
  [ FAIL 4 | WARN 22409 | SKIP 4 | PASS 351 ]
  Error: Test failures
  In addition: There were 50 or more warnings (use warnings() to see the first 50)
  Execution halted