Running 'runit.R' [4s]
  Running 'testthat.R' [1s]
Running the tests in 'tests/runit.R' failed.
Complete output:
  > #!/usr/bin/Rscript --vanilla
  > is_failure <- function(result) {
  +     res <- RUnit::getErrors(result)
  +     names(res) <- tolower(names(res)) # soothe lintr
  +     sum_of_exceptions <- res[["nerr"]] + res[["nfail"]]
  +     fail <- as.logical(sum_of_exceptions)
  +     return(fail)
  + }
  > 
  > if (interactive()) {
  +     pkgload::load_all(path = ".") # needed to use pkgload's shim version of
  +     # base's system.file
  +     unit_dir <- system.file("inst", "runit_tests", package = "cleanr")
  + } else {
  +     require("cleanr", quietly = TRUE, character.only = TRUE) ||
  +         pkgload::load_all(path = ".") # needed to use pkgload's shim version of
  +     r_call <- commandArgs(trailingOnly = FALSE)
  +     if (any(grepl("--file", r_call))) {
  +         unit_dir <- file.path("inst", "runit_tests")
  +     } else {
  +         unit_dir <- system.file("runit_tests", package = "cleanr")
  +     }
  + }
  > if (! dir.exists(unit_dir)) {
  +     stop("Can not find RUnit test directory ", unit_dir,
  +          ". Try to (re)install the package first.")
  + }
  > package_suite <- RUnit::defineTestSuite("cleanr_unit_test",
  +                                         dirs = unit_dir,
  +                                         testFileRegexp = "^.*\\.[rR]",
  +                                         testFuncRegexp = "^test_+")
  > test_result <- RUnit::runTestSuite(package_suite)
  
  
  Executing test function test_check_nesting_depth  ... Error in cleanr::check_nesting_depth(failing_function) : 
    found nesting depth 4, max_nesting_depth was 3
   done successfully.
  
  
  
  Executing test function test_check_return  ... Error in cleanr::check_return(failing_function) : 
    found no return() statement at all.
  In addition: Warning message:
  In cleanr::check_return(failing_function) :
    Just checking for a line starting with a  return statement.
   This is no check for all return paths  being explicit.
   done successfully.
  
  
  
  Executing test function test_file_length  ... Error in cleanr::check_file_length(function_file, max_file_length = 9) : 
    D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: 24 lines in file.
   done successfully.
  
  
  
  Executing test function test_file_width  ... Error in cleanr::check_file_width(function_file, max_file_width = 9) : 
    D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 1 counts 48 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 2 counts 87 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 3 counts 28 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 4 counts 24 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 5 counts 28 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 6 counts 32 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 7 counts 36 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 8 counts 45 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 9 counts 17 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 10 counts 13 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 15 counts 48 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 16 counts 16 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 17 counts 28 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 18 counts 24 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 19 counts 28 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 20 counts 37 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 23 counts 16 characters.
   done successfully.
  
  
  
  Executing test function test_line_width  ... Error in cleanr::check_line_width(failing_function, max_line_width = 9) : 
    line 1: found width 16 max_line_width was 9
  line 2: found width 24 max_line_width was 9
  line 3: found width 28 max_line_width was 9
  line 4: found width 32 max_line_width was 9
  line 5: found width 36 max_line_width was 9
  line 6: found width 43 max_line_width was 9
  line 7: found width 17 max_line_width was 9
  line 8: found width 13 max_line_width was 9
   done successfully.
  
  
  
  Executing test function test_num_arguments  ... Error in cleanr::check_num_arguments(failing_function, max_num_arguments = 1) : 
    found 2 arguments, max_num_arguments was 1
   done successfully.
  
  
  
  Executing test function test_num_lines  ... Error in cleanr::check_num_lines(failing_function, max_lines = 9) : 
    found 10 lines, max_lines was 9
   done successfully.
  
  
  
  Executing test function test_num_lines_of_code  ... Error in cleanr::check_num_lines_of_code(failing_function, max_lines = 9) : 
    found 10 lines of code, max_lines_of_code was 9
   done successfully.
  
  
  
  Executing test function test_get_function_body  ... [1] "print(3)"
   done successfully.
  
  
  
  Executing test function test_options  ...  done successfully.
  
  
  
  Executing test function test_s4_dircetory  ... Error in methods::setMethod(f = "auc", methods::signature(object = "bincap"),  : 
    no existing definition for function 'auc'. Probably due to failed S4 method loading.
  In addition: Warning messages:
  1: In set_cleanr_options(max_lines_of_code = 40, overwrite = TRUE) :
    maximum number of lines was less than maximum number of lines of code, resetting the former to the latter.
  2: In getPackageName(where) :
    Created a package name, '2021-02-14 23:53:04', when none found
  3: In getPackageName(where) :
    Created a package name, '2021-02-14 23:53:04', when none found
   done successfully.
  
  
  
  Executing test function test_s4_known_generic  ...  done successfully.
  
  
  
  Executing test function test_s4_no_generic  ...  done successfully.
  
  
  
  Executing test function test_s4_package  ... v Creating 'D:/temp/RtmpEjWbu8/fake/'
  v Setting active project to 'D:/temp/RtmpEjWbu8/fake'
  v Creating 'R/'
  v Writing 'DESCRIPTION'
  Package: fake
  Title: What the Package Does (One Line, Title Case)
  Version: 0.0.0.9000
  Authors@R (parsed):
      * First Last <first.last@example.com> [aut, cre] (YOUR-ORCID-ID)
  Description: What the package does (one paragraph).
  License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a
      license
  Encoding: UTF-8
  LazyData: true
  Roxygen: list(markdown = TRUE)
  RoxygenNote: 7.1.1
  v Writing 'NAMESPACE'
  v Setting active project to '<no active project>'
  Loading fake
  Timing stopped at: 2.57 0.25 2.82
  Error in add_classes_to_exports(ns = nsenv, package = package, exports = exports,  : 
    object 'lev' not found
   done successfully.
  
  
  
  Executing test function test_exception  ... Error in eval(expr, envir = parent.frame()) : Hello, error!
   done successfully.
  
  
  
  Executing test function test_is_not_false  ...  done successfully.
  
  
  
  Executing test function test_check_directory  ... Error in check_directory(system.file("runit_tests", "source", "R", package = "cleanr")) : 
    D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R   D:\temp\Rtmp0o7aNR\RLIBS_1ad428982ceb\cleanr\runit_tests\source\R\functions.R: line 2 counts 87 characters.
   D:\temp\Rtmp0o7aNR\RLIBS_1ad428982ceb\cleanr\runit_tests\source\R\functions.R  failing_function  found nesting depth 4, max_nesting_depth was 3
  failing_function  line 1: found width 87 max_line_width was 80
  failing_function  found no return() statement at all.
  In addition: Warning messages:
  1: In check_return(object, check_return = check_return) :
    Just checking for a line starting with a  return statement.
   This is no check for all return paths  being explicit.
  2: In check_return(object, check_return = check_return) :
    Just checking for a line starting with a  return statement.
   This is no check for all return paths  being explicit.
   done successfully.
  
  
  
  Executing test function test_check_file  ... Error in check_file(function_file) : 
     D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 2 counts 87 characters.
   D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R  failing_function  found nesting depth 4, max_nesting_depth was 3
  failing_function  line 1: found width 87 max_line_width was 80
  failing_function  found no return() statement at all.
  In addition: Warning messages:
  1: In check_return(object, check_return = check_return) :
    Just checking for a line starting with a  return statement.
   This is no check for all return paths  being explicit.
  2: In check_return(object, check_return = check_return) :
    Just checking for a line starting with a  return statement.
   This is no check for all return paths  being explicit.
  Error in check_file(function_file, silly_arguemnt = "FIFI") : 
    got unkown argument(s):  silly_arguemnt
   done successfully.
  
  
  
  Executing test function test_check_file_layout  ... Error in check_file_layout(function_file, max_file_width = 10) : 
    D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 1 counts 48 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 2 counts 87 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 3 counts 28 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 4 counts 24 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 5 counts 28 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 6 counts 32 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 7 counts 36 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 8 counts 45 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 9 counts 17 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 10 counts 13 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 15 counts 48 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 16 counts 16 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 17 counts 28 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 18 counts 24 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 19 counts 28 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 20 counts 37 characters.
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R: line 23 counts 16 characters.
   done successfully.
  
  
  
  Executing test function test_check_function_layout  ... Error in check_function_layout(failing_function, max_line_width = 10) : 
    failing_function  found nesting depth 4, max_nesting_depth was 3
  failing_function  line 1: found width 16 max_line_width was 10
  line 2: found width 24 max_line_width was 10
  line 3: found width 28 max_line_width was 10
  line 4: found width 32 max_line_width was 10
  line 5: found width 36 max_line_width was 10
  line 6: found width 43 max_line_width was 10
  line 7: found width 17 max_line_width was 10
  line 8: found width 13 max_line_width was 10
  failing_function  found no return() statement at all.
  In addition: Warning messages:
  1: In check_return(object, check_return = check_return) :
    Just checking for a line starting with a  return statement.
   This is no check for all return paths  being explicit.
  2: In check_return(object, check_return = check_return) :
    Just checking for a line starting with a  return statement.
   This is no check for all return paths  being explicit.
   done successfully.
  
  
  
  Executing test function test_check_functions_in_file  ... Error in check_functions_in_file(function_file) : 
    D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/source/R/functions.R  failing_function  found nesting depth 4, max_nesting_depth was 3
  failing_function  line 1: found width 87 max_line_width was 80
  failing_function  found no return() statement at all.
  In addition: Warning messages:
  1: In check_return(object, check_return = check_return) :
    Just checking for a line starting with a  return statement.
   This is no check for all return paths  being explicit.
  2: In check_return(object, check_return = check_return) :
    Just checking for a line starting with a  return statement.
   This is no check for all return paths  being explicit.
   done successfully.
  
  > RUnit::printTextProtocol(test_result, showDetails = TRUE, fileName = "")
  RUNIT TEST PROTOCOL -- Sun Feb 14 23:53:07 2021 
  *********************************************** 
  Number of test functions: 21 
  Number of errors: 1 
  Number of failures: 0 
  
   
  1 Test Suite : 
  cleanr_unit_test - 21 test functions, 1 error, 0 failures
  ERROR in test_s4_package: Error in add_classes_to_exports(ns = nsenv, package = package, exports = exports,  : 
    object 'lev' not found
  
  
  
  Details 
  *************************** 
  Test Suite: cleanr_unit_test 
  Test function regexp: ^test_+ 
  Test file regexp: ^.*\.[rR] 
  Involved directory: 
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests 
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_checks.R 
  test_check_nesting_depth: (2 checks) ... OK (0.01 seconds)
  test_check_return: (2 checks) ... OK (0 seconds)
  test_file_length: (2 checks) ... OK (0 seconds)
  test_file_width: (2 checks) ... OK (0 seconds)
  test_line_width: (2 checks) ... OK (0 seconds)
  test_num_arguments: (2 checks) ... OK (0 seconds)
  test_num_lines: (2 checks) ... OK (0.02 seconds)
  test_num_lines_of_code: (2 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_internals.R 
  test_get_function_body: (1 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_options.R 
  test_options: (8 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_s4.R 
  test_s4_dircetory: (1 checks) ... OK (0.23 seconds)
  test_s4_known_generic: (1 checks) ... OK (0.02 seconds)
  test_s4_no_generic: (1 checks) ... OK (0 seconds)
  test_s4_package: ERROR !! 
  Error in add_classes_to_exports(ns = nsenv, package = package, exports = exports,  : 
    object 'lev' not found
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_throw.R 
  test_exception: (1 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_utils.R 
  test_is_not_false: (10 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_wrappers.R 
  test_check_directory: (2 checks) ... OK (0.01 seconds)
  test_check_file: (3 checks) ... OK (0.04 seconds)
  test_check_file_layout: (2 checks) ... OK (0 seconds)
  test_check_function_layout: (2 checks) ... OK (0 seconds)
  test_check_functions_in_file: (2 checks) ... OK (0.03 seconds)
  > if (is_failure(test_result)) {
  +     RUnit::printTextProtocol(test_result, showDetails = TRUE)
  +     stop("RUnit failed.")
  + }
  RUNIT TEST PROTOCOL -- Sun Feb 14 23:53:07 2021 
  *********************************************** 
  Number of test functions: 21 
  Number of errors: 1 
  Number of failures: 0 
  
   
  1 Test Suite : 
  cleanr_unit_test - 21 test functions, 1 error, 0 failures
  ERROR in test_s4_package: Error in add_classes_to_exports(ns = nsenv, package = package, exports = exports,  : 
    object 'lev' not found
  
  
  
  Details 
  *************************** 
  Test Suite: cleanr_unit_test 
  Test function regexp: ^test_+ 
  Test file regexp: ^.*\.[rR] 
  Involved directory: 
  D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests 
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_checks.R 
  test_check_nesting_depth: (2 checks) ... OK (0.01 seconds)
  test_check_return: (2 checks) ... OK (0 seconds)
  test_file_length: (2 checks) ... OK (0 seconds)
  test_file_width: (2 checks) ... OK (0 seconds)
  test_line_width: (2 checks) ... OK (0 seconds)
  test_num_arguments: (2 checks) ... OK (0 seconds)
  test_num_lines: (2 checks) ... OK (0.02 seconds)
  test_num_lines_of_code: (2 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_internals.R 
  test_get_function_body: (1 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_options.R 
  test_options: (8 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_s4.R 
  test_s4_dircetory: (1 checks) ... OK (0.23 seconds)
  test_s4_known_generic: (1 checks) ... OK (0.02 seconds)
  test_s4_no_generic: (1 checks) ... OK (0 seconds)
  test_s4_package: ERROR !! 
  Error in add_classes_to_exports(ns = nsenv, package = package, exports = exports,  : 
    object 'lev' not found
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_throw.R 
  test_exception: (1 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_utils.R 
  test_is_not_false: (10 checks) ... OK (0 seconds)
  --------------------------- 
  Test file: D:/temp/Rtmp0o7aNR/RLIBS_1ad428982ceb/cleanr/runit_tests/runit_wrappers.R 
  test_check_directory: (2 checks) ... OK (0.01 seconds)
  test_check_file: (3 checks) ... OK (0.04 seconds)
  test_check_file_layout: (2 checks) ... OK (0 seconds)
  test_check_function_layout: (2 checks) ... OK (0 seconds)
  test_check_functions_in_file: (2 checks) ... OK (0.03 seconds)
  Error: RUnit failed.
  Execution halted