Running 'testthat.R' [138s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > 
  > # Need to use qualified call, this is checked in helper-print.R
  > testthat::test_check("dm")
  Loading required package: dm
  
  Attaching package: 'dm'
  
  The following object is masked from 'package:stats':
  
      filter
  
  Starting 2 test processes
  [ FAIL 6 | WARN 2 | SKIP 216 | PASS 1339 ]
  
  ══ Skipped tests (216) ═════════════════════════════════════════════════════════
  • COMPOUND (1): 'test-rows-dm.R:205:3'
  • Dependent on database version, find better way to record this info (1):
    'test-meta.R:19:3'
  • FIXME (2): 'test-learn.R:154:3', 'test-nest.R:2:3'
  • FIXME: Unstable on GHA? (1): 'test-dm.R:495:3'
  • Need to think about it (1): 'test-key-helpers.R:45:3'
  • Needs https://github.com/tidyverse/dbplyr/pull/649 (2): 'test-dm.R:274:3',
    'test-dm.R:289:3'
  • On CRAN (177): 'test-zzx-deprecated.R:2:3', 'test-zzx-deprecated.R:15:3',
    'test-zzx-deprecated.R:25:3', 'test-zzx-deprecated.R:36:3',
    'test-zzx-deprecated.R:46:3', 'test-zzx-deprecated.R:60:3',
    'test-zzx-deprecated.R:83:3', 'test-zzx-deprecated.R:93:3',
    'test-zzx-deprecated.R:108:3', 'test-zzx-deprecated.R:124:3',
    'test-zzx-deprecated.R:144:3', 'test-zzx-deprecated.R:154:3',
    'test-zzx-deprecated.R:169:3', 'test-zzx-deprecated.R:188:3',
    'test-zzx-deprecated.R:224:3', 'test-zzx-deprecated.R:258:3',
    'test-zzx-deprecated.R:278:3', 'test-zzx-deprecated.R:294:3',
    'test-zzx-deprecated.R:329:3', 'test-zzx-deprecated.R:344:3',
    'test-zzx-deprecated.R:359:3', 'test-dplyr.R:347:3', 'test-dplyr.R:506:3',
    'test-dplyr.R:545:3', 'test-dplyr.R:558:3', 'test-dplyr.R:569:3',
    'test-dplyr.R:598:3', 'test-dplyr.R:614:3', 'test-dplyr.R:810:3',
    'test-flatten.R:18:3', 'test-flatten.R:97:3', 'test-draw-dm.R:19:3',
    'test-draw-dm.R:112:3', 'test-draw-dm.R:128:3', 'test-draw-dm.R:164:3',
    'test-draw-dm.R:193:3', 'test-bind.R:42:3', 'test-bind.R:100:3',
    'test-bind.R:110:3', 'test-bind.R:128:3', 'test-filter-dm.R:62:3',
    'test-filter-dm.R:173:3', 'test-filter-dm.R:182:3', 'test-filter-dm.R:191:3',
    'test-filter-dm.R:241:3', 'test-add-tbl.R:94:3', 'test-add-tbl.R:139:3',
    'test-autoincrement.R:17:3', 'test-autoincrement.R:24:3',
    'test-rows-dm.R:2:3', 'test-rows-dm.R:12:3', 'test-check_suggested.R:2:3',
    'test-check_suggested.R:16:3', 'test-code-generation.R:7:3',
    'test-check-cardinalities.R:29:3', 'test-check-cardinalities.R:287:3',
    'test-check-cardinalities.R:335:3', 'test-check-cardinalities.R:418:3',
    'test-datamodelr-code.R:4:3', 'test-datamodelr-code.R:17:3',
    'test-datamodelr-code.R:37:3', 'test-datamodelr-code.R:57:3',
    'test-datamodelr-code.R:78:3', 'test-datamodelr-code.R:99:3',
    'test-datamodelr-code.R:120:3', 'test-datamodelr-code.R:133:3',
    'test-db-interface.R:198:3', 'test-db-interface.R:240:3',
    'test-disambiguate.R:2:3', 'test-disentangle.R:2:3', 'test-dm.R:2:3',
    'test-dm.R:70:3', 'test-dm.R:110:3', 'test-dm.R:150:3', 'test-dm.R:199:3',
    'test-dm.R:207:3', 'test-dm.R:224:3', 'test-dm.R:510:3', 'test-dm.R:536:3',
    'test-dm.R:566:3', 'test-dm.R:600:3', 'test-dm_deconstruct.R:2:3',
    'test-dm_deconstruct.R:9:3', 'test-dm_nest_tbl.R:17:3',
    'test-deconstruct.R:6:3', 'test-deconstruct.R:16:3',
    'test-deconstruct.R:26:3', 'test-deconstruct.R:55:3',
    'test-deconstruct.R:72:3', 'test-deconstruct.R:120:3',
    'test-deconstruct.R:146:3', 'test-deconstruct.R:162:3',
    'test-deconstruct.R:183:3', 'test-deconstruct.R:200:3',
    'test-deconstruct.R:224:3', 'test-deconstruct.R:248:3',
    'test-deconstruct.R:272:3', 'test-deconstruct.R:296:3',
    'test-deconstruct.R:322:3', 'test-deconstruct.R:348:3',
    'test-deconstruct.R:374:3', 'test-deconstruct.R:400:3',
    'test-deconstruct.R:422:3', 'test-deconstruct.R:481:3',
    'test-deconstruct.R:494:3', 'test-deconstruct.R:509:3',
    'test-deconstruct.R:527:3', 'test-deconstruct.R:574:3',
    'test-deconstruct.R:588:3', 'test-deconstruct.R:601:3',
    'test-dm_pixarfilms.R:4:3', 'test-enum-ops.R:11:3', 'test-enum-ops.R:30:3',
    'test-enum-ops.R:103:3', 'test-enum-ops.R:176:3',
    'test-enumerate_all_paths.R:2:3', 'test-error-helpers.R:2:3',
    'test-examine-cardinalities.R:2:3', 'test-examine-cardinalities.R:16:3',
    'test-examine-constraints.R:72:3', 'test-examine-constraints.R:81:3',
    'test-examine-constraints.R:91:3', 'test-dm_wrap.R:12:3',
    'test-dm_wrap.R:79:3', 'test-format.R:2:3', 'test-graph.R:29:3',
    'test-json.R:5:3', 'test-json_nest.R:2:3', 'test-json_pack.R:2:3',
    'test-foreign-keys.R:16:3', 'test-foreign-keys.R:145:3',
    'test-foreign-keys.R:254:3', 'test-foreign-keys.R:262:3',
    'test-foreign-keys.R:289:3', 'test-foreign-keys.R:308:3',
    'test-learn.R:448:3', 'test-meta.R:3:3', 'test-pack_join.R:5:3',
    'test-paste.R:14:3', 'test-paste.R:97:3', 'test-key-helpers.R:4:3',
    'test-key-helpers.R:327:3', 'test-key-helpers.R:333:3',
    'test-key-helpers.R:342:3', 'test-key-helpers.R:350:3',
    'test-select-tbl.R:32:3', 'test-select.R:2:3', 'test-select.R:10:3',
    'test-select.R:18:3', 'test-select.R:47:3', 'test-select.R:88:3',
    'test-primary-keys.R:25:3', 'test-primary-keys.R:94:3',
    'test-primary-keys.R:178:3', 'test-primary-keys.R:198:3',
    'test-primary-keys.R:217:3', 'test-primary-keys.R:229:3',
    'test-primary-keys.R:246:3', 'test-primary-keys.R:253:3',
    'test-table-surgery.R:19:3', 'test-tidyselect.R:25:3', 'test-tidyr.R:54:3',
    'test-tidyr.R:92:3', 'test-unique-keys.R:2:3', 'test-unique-keys.R:175:3',
    'test-upgrade.R:3:3', 'test-upgrade.R:15:3', 'test-upgrade.R:26:3',
    'test-upgrade.R:42:3', 'test-upgrade.R:53:3', 'test-upgrade.R:72:3',
    'test-upgrade.R:86:3', 'test-upgrade.R:102:3', 'test-upgrade.R:116:3',
    'test-waldo.R:8:3', 'test-zoom.R:30:3', 'test-zoom.R:135:3'
  • Slow test. To run, set CI=true (6): 'test-db-interface.R:9:3',
    'test-dplyr-src.R:51:3', 'test-examine-constraints.R:34:3',
    'test-examine-constraints.R:54:3', 'test-foreign-keys.R:180:3',
    'test-primary-keys.R:158:3'
  • dm argument (1): 'test-select-tbl.R:73:3'
  • does not work on `df` (1): 'test-validate.R:204:3'
  • keyed = TRUE (1): 'test-deconstruct.R:91:3'
  • not testing deprecated cdm_nycflights13(): test too slow (1):
    'test-zzx-deprecated.R:269:3'
  • not testing deprecated learning from DB: test too slow (1):
    'test-zzx-deprecated.R:239:3'
  • only works on `db` (1): 'test-filter-dm.R:47:3'
  • only works on `mssql` (4): 'test-db-helpers.R:2:3', 'test-learn.R:208:3',
    'test-learn.R:284:3', 'test-schema.R:129:3'
  • only works on `mssql`, `postgres` (4): 'test-db-interface.R:83:3',
    'test-db-interface.R:96:3', 'test-db-interface.R:127:3', 'test-schema.R:2:3'
  • only works on `mssql`, `postgres`, `maria` (4): 'test-learn.R:2:3',
    'test-learn.R:69:3', 'test-learn.R:368:3', 'test-meta.R:9:3'
  • only works on `postgres` (2): 'test-db-helpers.R:108:3', 'test-schema.R:99:3'
  • only works on `postgres`, `mssql` (2): 'test-json_nest.R:10:3',
    'test-json_pack.R:10:3'
  • only works on `postgres`, `mssql`, `sqlite` (1): 'test-rows-dm.R:223:3'
  • only works on `postgres`, `sqlite`, `mssql`, `maria` (1):
    'test-db-interface.R:249:3'
  • only works on `sqlite` (1): 'test-schema.R:201:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-bind.R:53:3'): errors: src mismatches ──────────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map(.x, .f, ..., .progress = .progress)`: i In index: 6.
  Caused by error:
  ! Parser Error: FOREIGN KEY constraints cannot use CASCADE, SET NULL or SET DEFAULT
  Backtrace:
       ▆
    1. ├─dm:::expect_dm_error(...) at test-bind.R:53:2
    2. │ └─testthat::expect_error(expr, class = dm_error(class)) at D:\RCompile\CRANpkg\local\4.3\dm.Rcheck\tests\testthat\helper-expectations.R:48:2
    3. │   └─testthat:::expect_condition_matching(...)
    4. │     └─testthat:::quasi_capture(...)
    5. │       ├─testthat (local) .capture(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. ├─dm::dm_bind(dm_for_flatten(), dm_for_filter_duckdb())
    9. │ └─rlang::list2(...)
   10. ├─dm:::dm_for_filter_duckdb()
   11. ├─dm::copy_dm_to(duckdb_test_src(), dm_for_filter()) at D:\RCompile\CRANpkg\local\4.3\dm.Rcheck\tests\testthat\helper-src.R:26:6
   12. │ └─purrr::walk(...)
   13. │   └─purrr::map(.x, .f, ..., .progress = .progress)
   14. │     └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
   15. │       ├─purrr:::with_indexed_errors(...)
   16. │       │ └─base::withCallingHandlers(...)
   17. │       ├─purrr:::call_with_cleanup(...)
   18. │       └─dm (local) .f(.x[[i]], ...)
   19. │         ├─DBI::dbExecute(dest_con, .x, immediate = TRUE)
   20. │         └─DBI::dbExecute(dest_con, .x, immediate = TRUE)
   21. │           ├─DBI::dbSendStatement(conn, statement, ...)
   22. │           └─DBI::dbSendStatement(conn, statement, ...)
   23. │             ├─DBI::dbSendQuery(conn, statement, ...)
   24. │             └─duckdb::dbSendQuery(conn, statement, ...)
   25. │               └─duckdb (local) .local(conn, statement, ...)
   26. │                 └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   27. └─base::.handleSimpleError(...)
   28.   └─purrr (local) h(simpleError(msg, call))
   29.     └─cli::cli_abort(...)
   30.       └─rlang::abort(...)
  ── Error ('test-rows-dm.R:92:3'): dm_rows_update() ─────────────────────────────
  `{ ... }` threw an unexpected error.
  Message: object 'dm_copy' not found
  Class:   simpleError/error/condition
  ── Error ('test-rows-dm.R:154:3'): dm_rows_truncate() ──────────────────────────
  `{ ... }` threw an unexpected error.
  Message: object 'dm_copy' not found
  Class:   simpleError/error/condition
  ── Error ('test-dm.R:487:3'): dm_get_con() works ───────────────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map(.x, .f, ..., .progress = .progress)`: i In index: 6.
  Caused by error:
  ! Parser Error: FOREIGN KEY constraints cannot use CASCADE, SET NULL or SET DEFAULT
  Backtrace:
       ▆
    1. ├─testthat::expect_identical(dm_get_con(dm_for_filter_db()), con_from_src_or_con(my_db_test_src())) at test-dm.R:487:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─dm::dm_get_con(dm_for_filter_db())
    5. │ └─dm:::check_not_zoomed(dm)
    6. │   └─dm:::check_dm(dm)
    7. │     └─dm::is_dm(x)
    8. ├─dm:::dm_for_filter_db()
    9. ├─dm::copy_dm_to(my_db_test_src(), dm_for_filter()) at D:\RCompile\CRANpkg\local\4.3\dm.Rcheck\tests\testthat\helper-src.R:330:2
   10. │ └─purrr::walk(...)
   11. │   └─purrr::map(.x, .f, ..., .progress = .progress)
   12. │     └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
   13. │       ├─purrr:::with_indexed_errors(...)
   14. │       │ └─base::withCallingHandlers(...)
   15. │       ├─purrr:::call_with_cleanup(...)
   16. │       └─dm (local) .f(.x[[i]], ...)
   17. │         ├─DBI::dbExecute(dest_con, .x, immediate = TRUE)
   18. │         └─DBI::dbExecute(dest_con, .x, immediate = TRUE)
   19. │           ├─DBI::dbSendStatement(conn, statement, ...)
   20. │           └─DBI::dbSendStatement(conn, statement, ...)
   21. │             ├─DBI::dbSendQuery(conn, statement, ...)
   22. │             └─duckdb::dbSendQuery(conn, statement, ...)
   23. │               └─duckdb (local) .local(conn, statement, ...)
   24. │                 └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   25. └─base::.handleSimpleError(...)
   26.   └─purrr (local) h(simpleError(msg, call))
   27.     └─cli::cli_abort(...)
   28.       └─rlang::abort(...)
  ── Error ('test-nest.R:43:3'): 'nest_join_dm_zoomed()' fails for DB-'dm' ───────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map(.x, .f, ..., .progress = .progress)`: i In index: 6.
  Caused by error:
  ! Parser Error: FOREIGN KEY constraints cannot use CASCADE, SET NULL or SET DEFAULT
  Backtrace:
       ▆
    1. ├─dm:::expect_dm_error(...) at test-nest.R:43:2
    2. │ └─testthat::expect_error(expr, class = dm_error(class)) at D:\RCompile\CRANpkg\local\4.3\dm.Rcheck\tests\testthat\helper-expectations.R:48:2
    3. │   └─testthat:::expect_condition_matching(...)
    4. │     └─testthat:::quasi_capture(...)
    5. │       ├─testthat (local) .capture(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. ├─dm_zoom_to(dm_for_filter_duckdb(), tf_3) %>% ...
    9. ├─dm:::nest_join_dm_zoomed(.)
   10. ├─dm::dm_zoom_to(dm_for_filter_duckdb(), tf_3)
   11. │ └─dm:::check_not_zoomed(dm)
   12. │   └─dm:::check_dm(dm)
   13. │     └─dm::is_dm(x)
   14. ├─dm:::dm_for_filter_duckdb()
   15. ├─dm::copy_dm_to(duckdb_test_src(), dm_for_filter()) at D:\RCompile\CRANpkg\local\4.3\dm.Rcheck\tests\testthat\helper-src.R:26:6
   16. │ └─purrr::walk(...)
   17. │   └─purrr::map(.x, .f, ..., .progress = .progress)
   18. │     └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
   19. │       ├─purrr:::with_indexed_errors(...)
   20. │       │ └─base::withCallingHandlers(...)
   21. │       ├─purrr:::call_with_cleanup(...)
   22. │       └─dm (local) .f(.x[[i]], ...)
   23. │         ├─DBI::dbExecute(dest_con, .x, immediate = TRUE)
   24. │         └─DBI::dbExecute(dest_con, .x, immediate = TRUE)
   25. │           ├─DBI::dbSendStatement(conn, statement, ...)
   26. │           └─DBI::dbSendStatement(conn, statement, ...)
   27. │             ├─DBI::dbSendQuery(conn, statement, ...)
   28. │             └─duckdb::dbSendQuery(conn, statement, ...)
   29. │               └─duckdb (local) .local(conn, statement, ...)
   30. │                 └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   31. └─base::.handleSimpleError(...)
   32.   └─purrr (local) h(simpleError(msg, call))
   33.     └─cli::cli_abort(...)
   34.       └─rlang::abort(...)
  ── Error ('test-validate.R:192:3'): validator speaks up (sqlite()) ─────────────
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(., data = if_else(table == "tf_1", list(dm_for_filter_duckdb()$tf_1), 
      data))`: i In argument: `data = if_else(table == "tf_1", list(dm_for_filter_duckdb()$tf_1), data)`.
  Caused by error in `map()`:
  i In index: 6.
  Caused by error:
  ! Parser Error: FOREIGN KEY constraints cannot use CASCADE, SET NULL or SET DEFAULT
  
  [ FAIL 6 | WARN 2 | SKIP 216 | PASS 1339 ]
  Deleting unused snapshots:
  • datamodelr-code/nycflights13.dot
  • datamodelr-code/nycflights13_draw_uk_1.dot
  • datamodelr-code/nycflights13_draw_uk_2.dot
  • datamodelr-code/nycflights13_draw_uk_3.dot
  • datamodelr-code/nycflights13_table_desc_1.dot
  • datamodelr-code/nycflights13_table_desc_2.dot
  • datamodelr-code/weird.dot
  • df/meta/columns.csv
  • draw-dm/empty-table-in-dm.svg
  • draw-dm/nycflight-dm-types.svg
  • draw-dm/nycflight-dm.svg
  • draw-dm/single-empty-table-dm.svg
  • draw-dm/table-desc-1-dm.svg
  • draw-dm/table-desc-2-dm.svg
  • draw-dm/table-desc-3-dm.svg
  • draw-dm/table-desc-4-dm.svg
  • draw-dm/table-uk-1-dm.svg
  • draw-dm/table-uk-2-dm.svg
  • duckdb/meta/columns.csv
  • maria/meta/columns.csv
  • mssql/meta/columns.csv
  • postgres/meta/columns.csv
  • sqlite/meta/columns.csv
  Error: Test failures
  Execution halted