Running ‘testthat.R’ [32s/63s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > if (requireNamespace("testthat", quietly = TRUE)) {
  +   library(testthat)
  +   library(mlr3db)
  +   test_check("mlr3db")
  + }
  Loading required package: mlr3
  Loading required package: RSQLite
  Loading required package: RSQLite
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test_as_duckdb_backend.R:7:3): data ────────────────────────────────
  Check on x is not TRUE
  
  `actual` is a character vector ('May only contain the following types: {character}, but element 1 has type \'factor\'')
  `expected` is a logical vector (TRUE)
  May only contain the following types: {character}, but element 1 has type 'factor'
  Backtrace:
      █
   1. └─global::expect_iris_backend(b) test_as_duckdb_backend.R:7:2
   2.   └─checkmate::expect_list(x, "character", len = 1)
   3.     └─checkmate::makeExpectation(x, res, info, label)
   4.       └─testthat::expect_true(...)
  ── Failure (test_as_duckdb_backend.R:7:3): data ────────────────────────────────
  Check on x$Species is not TRUE
  
  `actual` is a character vector ('Must be equal to set {\'setosa\',\'versicolor\',\'virginica\'}, but is {\'setosa\',\'versicolor\',\'virginica\'}')
  `expected` is a logical vector (TRUE)
  Must be equal to set {'setosa','versicolor','virginica'}, but is {'setosa','versicolor','virginica'}
  Backtrace:
      █
   1. └─global::expect_iris_backend(b) test_as_duckdb_backend.R:7:2
   2.   └─checkmate::expect_set_equal(x$Species, levels(iris$Species))
   3.     └─checkmate::makeExpectation(x, res, info, label)
   4.       └─testthat::expect_true(...)
  ── Failure (test_as_duckdb_backend.R:13:3): DataBackend ────────────────────────
  Check on x is not TRUE
  
  `actual` is a character vector ('May only contain the following types: {character}, but element 1 has type \'factor\'')
  `expected` is a logical vector (TRUE)
  May only contain the following types: {character}, but element 1 has type 'factor'
  Backtrace:
      █
   1. └─global::expect_iris_backend(b) test_as_duckdb_backend.R:13:2
   2.   └─checkmate::expect_list(x, "character", len = 1)
   3.     └─checkmate::makeExpectation(x, res, info, label)
   4.       └─testthat::expect_true(...)
  ── Failure (test_as_duckdb_backend.R:13:3): DataBackend ────────────────────────
  Check on x$Species is not TRUE
  
  `actual` is a character vector ('Must be equal to set {\'setosa\',\'versicolor\',\'virginica\'}, but is {\'setosa\',\'versicolor\',\'virginica\'}')
  `expected` is a logical vector (TRUE)
  Must be equal to set {'setosa','versicolor','virginica'}, but is {'setosa','versicolor','virginica'}
  Backtrace:
      █
   1. └─global::expect_iris_backend(b) test_as_duckdb_backend.R:13:2
   2.   └─checkmate::expect_set_equal(x$Species, levels(iris$Species))
   3.     └─checkmate::makeExpectation(x, res, info, label)
   4.       └─testthat::expect_true(...)
  ── Failure (test_duckdb.R:8:3): Valid DataBackend ──────────────────────────────
  Check on x is not TRUE
  
  `actual` is a character vector ('May only contain the following types: {character}, but element 1 has type \'factor\'')
  `expected` is a logical vector (TRUE)
  May only contain the following types: {character}, but element 1 has type 'factor'
  Backtrace:
      █
   1. └─global::expect_iris_backend(b, n_missing = 30L) test_duckdb.R:8:2
   2.   └─checkmate::expect_list(x, "character", len = 1)
   3.     └─checkmate::makeExpectation(x, res, info, label)
   4.       └─testthat::expect_true(...)
  ── Failure (test_duckdb.R:8:3): Valid DataBackend ──────────────────────────────
  Check on x$Species is not TRUE
  
  `actual` is a character vector ('Must be equal to set {\'setosa\',\'versicolor\',\'virginica\'}, but is {\'setosa\',\'versicolor\',\'virginica\'}')
  `expected` is a logical vector (TRUE)
  Must be equal to set {'setosa','versicolor','virginica'}, but is {'setosa','versicolor','virginica'}
  Backtrace:
      █
   1. └─global::expect_iris_backend(b, n_missing = 30L) test_duckdb.R:8:2
   2.   └─checkmate::expect_set_equal(x$Species, levels(iris$Species))
   3.     └─checkmate::makeExpectation(x, res, info, label)
   4.       └─testthat::expect_true(...)
  ── Failure (test_duckdb.R:15:3): strings_as_factors ────────────────────────────
  Check on b$head()$Species is not TRUE
  
  `actual` is a character vector ('Must be of type \'character\', not \'factor\'')
  `expected` is a logical vector (TRUE)
  Must be of type 'character', not 'factor'
  Backtrace:
      █
   1. └─checkmate::expect_character(b$head()$Species, any.missing = FALSE) test_duckdb.R:15:2
   2.   └─checkmate::makeExpectation(x, res, info, label)
   3.     └─testthat::expect_true(...)
  ── Failure (test_duckdb.R:16:3): strings_as_factors ────────────────────────────
  Check on b$data(b$rownames[1], "Species")$Species is not TRUE
  
  `actual` is a character vector ('Must be of type \'character\', not \'factor\'')
  `expected` is a logical vector (TRUE)
  Must be of type 'character', not 'factor'
  Backtrace:
      █
   1. └─checkmate::expect_character(...) test_duckdb.R:16:2
   2.   └─checkmate::makeExpectation(x, res, info, label)
   3.     └─testthat::expect_true(...)
  ── Error (test_duckdb.R:22:3): strings_as_factors ──────────────────────────────
  Error in `.__DataBackendDuckDB__initialize(self = self, private = private, 
      super = super, data = data, table = table, primary_key = primary_key, 
      strings_as_factors = strings_as_factors, connector = connector)`: Assertion on 'strings_as_factors' failed: Must be a subset of the empty set, i.e. also empty.
  Backtrace:
      █
   1. ├─mlr3db::as_duckdb_backend(...) test_duckdb.R:22:2
   2. └─mlr3db:::as_duckdb_backend.data.frame(...)
   3.   └─mlr3db:::as_duckdb_backend.DataBackend(...)
   4.     └─DataBackendDuckDB$new(...)
   5.       └─mlr3db:::initialize(...)
   6.         └─mlr3db:::.__DataBackendDuckDB__initialize(...)
   7.           └─checkmate::assert_subset(strings_as_factors, string_cols)
   8.             └─checkmate::makeAssertion(x, res, .var.name, add)
   9.               └─checkmate:::mstop(...)
  ── Failure (test_reconnect.R:34:3): expectations + duckdb ──────────────────────
  Check on x is not TRUE
  
  `actual` is a character vector ('May only contain the following types: {character}, but element 1 has type \'factor\'')
  `expected` is a logical vector (TRUE)
  May only contain the following types: {character}, but element 1 has type 'factor'
  Backtrace:
      █
   1. └─global::expect_iris_backend(b2) test_reconnect.R:34:2
   2.   └─checkmate::expect_list(x, "character", len = 1)
   3.     └─checkmate::makeExpectation(x, res, info, label)
   4.       └─testthat::expect_true(...)
  ── Failure (test_reconnect.R:34:3): expectations + duckdb ──────────────────────
  Check on x$Species is not TRUE
  
  `actual` is a character vector ('Must be equal to set {\'setosa\',\'versicolor\',\'virginica\'}, but is {\'setosa\',\'versicolor\',\'virginica\'}')
  `expected` is a logical vector (TRUE)
  Must be equal to set {'setosa','versicolor','virginica'}, but is {'setosa','versicolor','virginica'}
  Backtrace:
      █
   1. └─global::expect_iris_backend(b2) test_reconnect.R:34:2
   2.   └─checkmate::expect_set_equal(x$Species, levels(iris$Species))
   3.     └─checkmate::makeExpectation(x, res, info, label)
   4.       └─testthat::expect_true(...)
  ── Error (test_train_predict_duckdb.R:4:1): (code run outside of `test_that()`) ──
  Error in `(function (id, levels) 
  {
      assert_character(levels, any.missing = FALSE, min.len = 1L, 
          null.ok = TRUE, .var.name = sprintf("levels of '%s'", 
              id))
  })(id = dots[[1L]][[6L]], levels = dots[[2L]][[6L]])`: Assertion on 'levels of 'Species'' failed: Must be of type 'character' (or 'NULL'), not 'factor'.
  Backtrace:
       █
    1. └─mlr3::TaskClassif$new("iris_duckdb", b, "Species") test_train_predict_duckdb.R:4:0
    2.   └─mlr3:::initialize(...)
    3.     └─mlr3:::.__TaskClassif__initialize(...)
    4.       └─super$initialize(...)
    5.         └─mlr3:::.__TaskSupervised__initialize(...)
    6.           └─super$initialize(...)
    7.             └─mlr3:::.__Task__initialize(...)
    8.               └─mlr3misc::pmap(...)
    9.                 └─mlr3misc:::mapply_list(.f, .x, list(...))
   10.                   └─base::.mapply(.f, .dots, .args)
   11.                     └─(function (id, levels) ...
   12.                       └─checkmate::assert_character(...)
   13.                         └─checkmate::makeAssertion(x, res, .var.name, add)
   14.                           └─checkmate:::mstop(...)
  
  [ FAIL 12 | WARN 0 | SKIP 0 | PASS 998 ]
  Error: Test failures
  In addition: Warning message:
  call dbDisconnect() when finished working with a connection 
  Execution halted