Running ‘spelling.R’
  Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(DataPackageR)
  > options("DataPackageR_interact" = FALSE)
  > # Test only if pandoc is available.
  > if (rmarkdown::pandoc_available()) {
  +   test_check("DataPackageR")
  + }
  ── 1. Error: package can be built from different locations (@test-build-location
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "cars_over_20") at testthat/test-build-locations.R:12
  2: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  3: check_not_nested(path_dir(path), name)
  4: stop_glue(message)
  
  ── 2. Error: can add a data item (@test-conditional-build.R#10)  ───────────────
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file, 
         file2), force = TRUE, r_object_names = c("cars_over_20"))) at testthat/test-conditional-build.R:10
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file, 
         file2), force = TRUE, r_object_names = c("cars_over_20"))
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 3. Error: assert_data_version (@test-data-version.R#12)  ────────────────────
  New project 'file75194bb715a3' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: suppressWarnings(datapackage.skeleton(name = pname, path = tempdir(), force = TRUE, 
         r_object_names = "tbl", code_files = f)) at testthat/test-data-version.R:12
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: datapackage.skeleton(name = pname, path = tempdir(), force = TRUE, r_object_names = "tbl", 
         code_files = f)
  4: datapackage_skeleton(name = name, path = path, force = force, code_files = code_files, 
         r_object_names = r_object_names)
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 4. Error: data objects can be read across scripts (@test-datapackager-object-
  Path '/data/gannet/ripley/R/packages/tests-clang/DataPackageR.Rcheck/tests/testthat' does not appear to be inside a project or package.
  1: expect_true(is.character(DataPackageR::project_path())) at testthat/test-datapackager-object-read.R:19
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: DataPackageR::project_path()
  5: usethis::proj_get()
  6: proj_set(".", quiet = quiet)
  7: stop_glue("Path {value(path)} does not appear to be inside a project or package.")
  
  ── 5. Error: data objects are saved incrementally in render_root (@test-datapack
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "cars_over_20") at testthat/test-datapackager-object-read.R:29
  2: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  3: check_not_nested(path_dir(path), name)
  4: stop_glue(message)
  
  ── 6. Error: data objects can be read from render_root or the data dir (@test-da
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "cars_over_20") at testthat/test-datapackager-object-read.R:47
  2: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  3: check_not_nested(path_dir(path), name)
  4: stop_glue(message)
  
  ── 7. Error: documentation is built via document() (@test-document.R#6)  ───────
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "cars_over_20") at testthat/test-document.R:6
  2: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  3: check_not_nested(path_dir(path), name)
  4: stop_glue(message)
  
  ── 8. Error: package built in different edge cases (@test-edge-cases.R#10)  ────
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "cars_over_20") at testthat/test-edge-cases.R:10
  2: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  3: check_not_nested(path_dir(path), name)
  4: stop_glue(message)
  
  ── 9. Error: use_ignore works (@test-ignore.R#7)  ──────────────────────────────
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20"))) at testthat/test-ignore.R:7
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20"))
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 10. Error: manual bump version when data unchanged (@test-manual-version-bump
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20"))) at testthat/test-manual-version-bump.R:10
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20"))
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 11. Error: news file is created (@test-news-update.R#6)  ────────────────────
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20")) at testthat/test-news-update.R:6
  2: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  3: check_not_nested(path_dir(path), name)
  4: stop_glue(message)
  
  ── 12. Error: can_read_pkg_description,  data_version (@test-pkg_description.R#1
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file, 
         file2), force = TRUE, r_object_names = c("cars_over_20", "pressure")) at testthat/test-pkg_description.R:10
  2: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  3: check_not_nested(path_dir(path), name)
  4: stop_glue(message)
  
  ── 13. Error: (unknown) (@test-project-path.R#5)  ──────────────────────────────
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20")) at testthat/test-project-path.R:5
  2: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  3: check_not_nested(path_dir(path), name)
  4: stop_glue(message)
  
  ── 14. Error: R file processing works and creates vignettes (@test-r-processing.
  New project 'rfiletest' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: datapackage_skeleton(name = "rfiletest", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "data") at testthat/test-r-processing.R:7
  2: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  3: check_not_nested(path_dir(path), name)
  4: stop_glue(message)
  
  ── 15. Error: data, code, and dependencies are moved into place by skeleton (@te
  New project 'datatest' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "datatest", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "data", raw_data_dir = raw_data, dependencies = ancillary)) at testthat/test-skeleton-data-dependencies.R:12
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "datatest", path = tempdir(), code_files = c(file), force = TRUE, 
         r_object_names = "data", raw_data_dir = raw_data, dependencies = ancillary)
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 16. Error: datapackage_skeleton errors with no name arg (@test-skeleton-edgec
  New project 'mtcars20' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "mtcars20", path = tempdir(), force = TRUE, 
         r_object_names = c("cars_over_20", "pressure"))) at testthat/test-skeleton-edgecases.R:26
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "mtcars20", path = tempdir(), force = TRUE, r_object_names = c("cars_over_20", 
         "pressure"))
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 17. Error: datapackage skeleton builds correct structure (@test-skeleton.R#9)
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "cars_over_20")) at testthat/test-skeleton.R:9
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "cars_over_20")
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 18. Error: can update (@test-updating-datapackager-version.R#11)  ───────────
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file, 
         file2), force = TRUE, r_object_names = c("cars_over_20"))) at testthat/test-updating-datapackager-version.R:11
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file, 
         file2), force = TRUE, r_object_names = c("cars_over_20"))
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 19. Error: use_raw_data works as expected (@test-use_raw_data.R#14)  ────────
  New project 'subsetCars20' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars20", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "data", raw_data_dir = raw_data, dependencies = ancillary)) at testthat/test-use_raw_data.R:14
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars20", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "data", raw_data_dir = raw_data, dependencies = ancillary)
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 20. Error: use_processing_script works as expected (@test-use_raw_data.R#61) 
  New project 'subsetCars20' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars20", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "data")) at testthat/test-use_raw_data.R:61
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars20", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "data")
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 21. Error: use_data_object works as expected (@test-use_raw_data.R#114)  ────
  New project 'subsetCars20' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars20", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "data")) at testthat/test-use_raw_data.R:114
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars20", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "data")
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 22. Error: auto bump version when data unchanged (@test-version-bump.R#9)  ──
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20"))) at testthat/test-version-bump.R:9
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20"))
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 23. Error: data changes but version out of sync (@test-version-management-edg
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20"))) at testthat/test-version-management-edge-cases.R:10
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20"))
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 24. Error: can add a file (@test-yaml-config.R#9)  ──────────────────────────
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20"))) at testthat/test-yaml-config.R:9
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = c("cars_over_20"))
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 25. Error: can remove a data item (@test-yaml-manipulation.R#9)  ────────────
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file, 
         file2), force = TRUE, r_object_names = c("cars_over_20", "pressure"))) at testthat/test-yaml-manipulation.R:9
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file, 
         file2), force = TRUE, r_object_names = c("cars_over_20", "pressure"))
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ── 26. Error: yaml reading, adding, removing, listing, and writing (@test-yaml.R
  New project 'subsetCars' is nested inside an existing project '/tmp/RtmpXvQyEI'.
  1: expect_null(datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "cars_over_20")) at testthat/test-yaml.R:6
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: datapackage_skeleton(name = "subsetCars", path = tempdir(), code_files = c(file), 
         force = TRUE, r_object_names = "cars_over_20")
  5: usethis::create_package(path = file.path(path, name), rstudio = FALSE, open = FALSE)
  6: check_not_nested(path_dir(path), name)
  7: stop_glue(message)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 52 SKIPPED: 0 FAILED: 26
  1. Error: package can be built from different locations (@test-build-locations.R#12) 
  2. Error: can add a data item (@test-conditional-build.R#10) 
  3. Error: assert_data_version (@test-data-version.R#12) 
  4. Error: data objects can be read across scripts (@test-datapackager-object-read.R#19) 
  5. Error: data objects are saved incrementally in render_root (@test-datapackager-object-read.R#29) 
  6. Error: data objects can be read from render_root or the data dir (@test-datapackager-object-read.R#47) 
  7. Error: documentation is built via document() (@test-document.R#6) 
  8. Error: package built in different edge cases (@test-edge-cases.R#10) 
  9. Error: use_ignore works (@test-ignore.R#7) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted