Running ‘testthat.R’ [30s/42s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(yardstick)
  For binary classification, the first factor level is assumed to be the event.
  Use the argument `event_level = "second"` to alter this as needed.
  > 
  > test_check("yardstick")
  [ FAIL 20 | WARN 0 | SKIP 50 | PASS 738 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (50)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-error-handling.R:9:3): `truth` should be factor ─────────────────
  `(expect_error(sens(pathology, 1, factor("A"))))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:15:3): At least 2 levels in truth ──────────────
  `(expect_error(sens(pathology, factor("A"), factor("A"))))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:21:3): Single character values are caught with correct errors ──
  `(expect_error(sens(pathology, "a", factor("A"))))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:29:3): Bad unquoted input is caught ────────────
  `(expect_error(sens(pathology, !!bad, factor("A"))))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:37:3): Non-allowed estimator ───────────────────
  `(expect_error(sens(pathology, pathology, scan, estimator = "blah")))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:43:3): Bad estimator + truth combination ───────
  `(expect_error(sens(hpc_cv, obs, pred, estimator = "binary")))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:49:3): Bad estimator type ──────────────────────
  `(expect_error(sens(hpc_cv, obs, pred, estimator = 1)))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:53:3): Bad estimator type ──────────────────────
  `(expect_error(sens(hpc_cv, obs, pred, estimator = c("1", "2"))))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:59:3): Numeric matrix in numeric metric ────────
  `(expect_error(rmse(solubility_test, matrix(1:5), prediction)))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:63:3): Numeric matrix in numeric metric ────────
  `(expect_error(rmse(solubility_test, solubility, matrix(1:5))))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:74:3): Factors with non identical levels ───────
  `(expect_error(sens(df, x, y)))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:80:3): Multiple estimate columns for a binary metric ──
  `(expect_error(roc_auc(two_class_example, truth, Class1:Class2)))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-error-handling.R:86:3): 1 estimate column for a multiclass metric ──
  `(expect_error(roc_auc(hpc_cv, obs, VF)))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-num-huber_loss.R:32:3): Huber Loss ──────────────────────────────
  `(...)` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-num-huber_loss.R:36:3): Huber Loss ──────────────────────────────
  `(...)` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-num-pseudo_huber_loss.R:21:3): Pseudo-Huber Loss ────────────────
  `(...)` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-num-pseudo_huber_loss.R:25:3): Pseudo-Huber Loss ────────────────
  `(...)` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-prob-roc_auc.R:274:3): can't use case weights and hand-till method ──
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. └─testthat::expect_snapshot(...) at test-prob-roc_auc.R:274:2
    2.   └─testthat:::verify_exec(quo_get_expr(x), quo_get_env(x), replay)
    3.     ├─base::unlist(lapply(results, replay))
    4.     └─base::lapply(results, replay)
    5.       └─testthat (local) FUN(X[[i]], ...)
    6.         ├─testthat:::snapshot_replay(x, state, transform = transform, cnd_class = cnd_class)
    7.         └─testthat:::snapshot_replay.condition(...)
    8.           └─rlang::cnd_message(x, prefix = TRUE)
    9.             └─rlang:::cnd_message_format_prefixed(cnd, ..., parent = FALSE)
   10.               └─rlang:::cnd_message_format(cnd, ..., alert = alert)
   11.                 └─rlang (local) cli_format(glue_escape(lines))
   12.                   └─rlang:::.rlang_cli_format(x, cli::format_error)
   13.                     └─cli::cli_format(x, .envir = emptyenv())
   14.                       └─cli:::fmt(...)
   15.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   16.                           ├─base::do.call(app[[msg$type]], msg$args)
   17.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-1194", class = NULL)
   18.                             └─cli:::clii_bullets(app, text, id, class)
   19.                               └─base::lapply(...)
   20.                                 └─cli (local) FUN(X[[i]], ...)
   21.                                   └─app$text(text[[i]])
   22.                                     └─cli:::clii_text(app, text)
   23.                                       └─app$xtext(text)
   24.                                         └─cli:::clii__xtext(...)
   25.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   26.                                             └─base::lapply(pars, ansi_trimws)
   27.                                               └─cli (local) FUN(X[[i]], ...)
  ── Error (test-prob-roc_aunp.R:20:3): AUNP errors on binary case ───────────────
  `(expect_error(roc_aunp(two_class_example, truth, Class1)))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  ── Error (test-prob-roc_aunu.R:20:3): AUNU errors on binary case ───────────────
  `(expect_error(roc_aunu(two_class_example, truth, Class1)))` threw an unexpected error.
  Message: number of characters is not computable in "bytes" encoding, element 1
  Class:   simpleError/error/condition
  
  [ FAIL 20 | WARN 0 | SKIP 50 | PASS 738 ]
  Error: Test failures
  Execution halted