Running 'test-all.R'
Running the tests in 'tests/test-all.R' failed.
Complete output:
  > library(testthat)
  > library(nat)
  Loading required package: rgl
  Registered S3 method overwritten by 'nat':
    method             from
    as.mesh3d.ashape3d rgl 
  Some nat functions depend on a CMTK installation. See ?cmtk and README.md for details.
  
  Attaching package: 'nat'
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, union
  
  > library(httr)
  > 
  > # suppress RGL in headless environments (some CRAN build machines fail otherwise)
  > if(!interactive())
  +   Sys.setenv(RGL_USE_NULL=TRUE)
  > 
  > # Is internet accessible?
  > internet.ok = identical(
  +   try(
  +     status_code(
  +       HEAD("http://flybrain.mrc-lmb.cam.ac.uk/", timeout(2))
  +     ),
  +     silent = TRUE
  +   ),
  +   200L
  + )
  > 
  > if(Sys.getenv('NOT_CRAN') == "true" && internet.ok) {
  +   # note that we want to run all tests requiring internet access
  +   Sys.setenv(NAT_INTERNET_TESTS="TRUE")
  +   # Run all test files
  +   test_check("nat")
  + } else {
  +   # We're on CRAN or flybrain is inacessible, so don't run anything involving 
  +   # remote files
  +   Sys.setenv(NAT_INTERNET_TESTS="")
  +   test_check("nat", filter="^[^.]+")
  + }
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (2)
  • empty test (3)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-neuron-io.R:736:3): we can read multiple neurons from a zip archive ──
  `zip_neurons <- read.neurons(zip_file, format = "zip", neuronnames = function(f) tools::file_path_sans_ext(basename(f)))` produced unexpected warnings.
  Expected match: specifies radius
  Actual values:
  * error 1 in extracting from zip file
  ── Failure (test-neuron-io.R:739:3): we can read multiple neurons from a zip archive ──
  `neurons` not equal to `zip_neurons`.
  names for target but not for current
  Length mismatch: comparison on first 0 components
  ── Error (test-neuron-io.R:751:3): we can write multiple neurons to a zip archive ──
  Error in `unzip(T)`: Cannot find system unzip command!
  Backtrace:
      █
   1. └─nat.utils::zipinfo(zip_file) test-neuron-io.R:751:2
   2.   ├─base::system2(...)
   3.   │ ├─base::paste(c(shQuote(command), env, args), collapse = " ")
   4.   │ └─base::shQuote(command)
   5.   │   └─base::gsub("(\\\\*)\"", "\\1\\1\\\\\"", string)
   6.   │     └─base::is.factor(x)
   7.   └─nat.utils:::unzip(T)
  ── Error (test-neuron-io.R:761:3): we can identify amira hxskel neurons ────────
  Error in `gzfile(x, open = "rb")`: cannot open the connection
  Backtrace:
      █
   1. ├─testthat::expect_false(is.hxskel("testdata/neuron/EBT7R.am")) test-neuron-io.R:761:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─nat:::is.hxskel("testdata/neuron/EBT7R.am")
   5.   └─nat::amiratype(f, bytes = bytes)
   6.     └─base::gzfile(x, open = "rb")
  ── Error (test-neuron-io.R:772:3): reading identical neuron in 2 amira formats and 3 encodings works ──
  Error in `file(con, "rb")`: cannot open the connection
  Backtrace:
      █
   1. ├─testthat::expect_warning(...) test-neuron-io.R:772:2
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─nat::read.neuron("testdata/neuron/testneuron_lineset.am")
   7.   └─nat::getformatreader(f, class = class)
   8.     └─base::readBin(file, what = raw(), n = max_magiclen)
   9.       └─base::file(con, "rb")
  ── Failure (test-neuron-io.R:784:3): reading gzipped binary format amiramesh neurons works ──
  is.gzip("testdata/neuron/testneuron_am3d_ascii.am.gz") is not TRUE
  
  `actual`:   <NA>
  `expected`: TRUE
  ── Failure (test-neuron-io.R:785:3): reading gzipped binary format amiramesh neurons works ──
  is.gzip("testdata/neuron/testneuron_am3d.am.gz") is not TRUE
  
  `actual`:   <NA>
  `expected`: TRUE
  ── Failure (test-neuron-io.R:786:3): reading gzipped binary format amiramesh neurons works ──
  is.gzip("testdata/neuron/testneuron_am3d.am") is not FALSE
  
  `actual`:   <NA> 
  `expected`: FALSE
  ── Error (test-neuron-io.R:791:3): we can identify amira hxlineset neurons ─────
  Error in `gzfile(x, open = "rb")`: cannot open the connection
  Backtrace:
      █
   1. ├─testthat::expect_true(is.hxlineset("testdata/neuron/EBT7R.am")) test-neuron-io.R:791:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─nat:::is.hxlineset("testdata/neuron/EBT7R.am")
   5.   └─nat::amiratype(f, bytes = bytes)
   6.     └─base::gzfile(x, open = "rb")
  ── Error (test-neuron-io.R:813:3): we can read a flycircuit lineset neuron w/o radius info ──
  Error in `file(con, "rb")`: cannot open the connection
  Backtrace:
      █
   1. ├─testthat::expect_warning(n <- read.neuron(f), regexp = "No width data") test-neuron-io.R:813:2
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─nat::read.neuron(f)
   7.   └─nat::getformatreader(f, class = class)
   8.     └─base::readBin(file, what = raw(), n = max_magiclen)
   9.       └─base::file(con, "rb")
  
  [ FAIL 10 | WARN 4 | SKIP 5 | PASS 764 ]
  Error: Test failures
  Execution halted