Running ‘testthat.R’ [62s/71s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(clim4health)
  > 
  > test_check("clim4health")
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  'crs' is not provided. Assuming WGS 84 (EPSG:4326) for gridded data.
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  'crs' is not provided. Assuming WGS 84 (EPSG:4326) for gridded data.
  Linking to GEOS 3.14.1, GDAL 3.8.5, PROJ 9.5.1; sf_use_s2() is TRUE
  terra 1.9.34
  
  Attaching package: 'terra'
  
  The following objects are masked from 'package:testthat':
  
      compare, describe
  
  The 'exp' s2dv_cube object has been aggregated to regions and has an 'area' dimension. Only bias adjustment or calibration will be applied, no spatial downscaling.
  Note: If using 'Intbc' and 'points' is not specified, downscaling is to a grid. 'target_grid' has not been specified. Downscaling will be done to the grid of 'obs'.
  Note: If using 'Intbc' and 'points' is not specified, downscaling is to a grid. 'target_grid' has not been specified. Downscaling will be done to the grid of 'obs'.
  Note: If using 'Intlr' and 'points' is not specified, downscaling is to a grid. 'target_grid' has not been specified. Downscaling will be done to the grid of 'obs'.
  [1] "Loading data to: /Volumes/Builds/packages/big-sur-x86_64/results/4.6/clim4health.Rcheck/tests/testthat/ERA5.land..April.data_2025_04_202504.nc"
  [1] "Loaded 4-2025: took 0.00424909591674805"
  [1] "File saved to: /Volumes/Builds/packages/big-sur-x86_64/results/4.6/clim4health.Rcheck/tests/testthat/ERA5.land..April.data_2025_04_202504.nc"
  [1] "Loading data to: /Volumes/Builds/packages/big-sur-x86_64/results/4.6/clim4health.Rcheck/tests/testthat/hindcast_201004.nc"
  [1] "Loaded 4-2010: took 0.00442910194396973"
  [1] "File saved to: /Volumes/Builds/packages/big-sur-x86_64/results/4.6/clim4health.Rcheck/tests/testthat/hindcast_201004.nc"
  [1] "Loading data to: /Volumes/Builds/packages/big-sur-x86_64/results/4.6/clim4health.Rcheck/tests/testthat/hindcast_201104.nc"
  [1] "Loaded 4-2011: took 0.00671887397766113"
  [1] "File saved to: /Volumes/Builds/packages/big-sur-x86_64/results/4.6/clim4health.Rcheck/tests/testthat/hindcast_201104.nc"
  [1] "Loading data to: /Volumes/Builds/packages/big-sur-x86_64/results/4.6/clim4health.Rcheck/tests/testthat/hindcast_201204.nc"
  [1] "Loaded 4-2012: took 0.00946402549743652"
  [1] "File saved to: /Volumes/Builds/packages/big-sur-x86_64/results/4.6/clim4health.Rcheck/tests/testthat/hindcast_201204.nc"
  - test-dataset-1 
  - test-dataset-2 
  Available climate datasets:
  - product_type 
  - variable 
  Required parameters:
  Variables found in 'path' are: 't2m'. Requested variables are: 'invalid_var'.
  Requested variable 'invalid_var' not found in 'path'. Skipping.
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  Aggregating ensemble members with the function: mean
  Spherical geometry (s2) switched off
  Coordinate system already present.
  i Adding new coordinate system, which will replace the existing one.
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  The provided areas are not in WGS84 (EPSG: 4326). They will be transformed into that CRS to perfom the spatial aggregation
  'crs' is not provided. Assuming WGS 84 (EPSG:4326) for gridded data.
  'crs' is not provided. Taking CRS from the input data if available.
  Time zone in the input data is empty. Assuming system timezone: America/New_York
  Time zone in the input data is empty. Assuming system timezone: America/New_York
  Saving _problems/test-c4h_time-91.R
  Time zone in the input data is empty. Assuming system timezone: America/New_York
  Saving _problems/test-c4h_time-101.R
  Requested variable 'dummy' not found in 'path'. Skipping.
  [ FAIL 2 | WARN 37 | SKIP 8 | PASS 543 ]
  
  ══ Skipped tests (8) ═══════════════════════════════════════════════════════════
  • On CRAN (8): 'test-c4h_downscale.R:255:3', 'test-c4h_downscale.R:277:3',
    'test-c4h_downscale.R:300:3', 'test-c4h_downscale.R:311:3',
    'test-c4h_downscale.R:347:3', 'test-c4h_downscale.R:384:3',
    'test-utils-load.R:654:3', 'test-utils-load.R:792:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-c4h_time.R:54:3'): Time examples run without problems ────────
  Expected `{ ... }` not to throw any errors.
  Actually got a <expectation_failure> with message:
    Expected `dim(stat_month$data)[["sdate"]]` to equal 3.
    Differences:
      `actual`: 6.0
    `expected`: 3.0
    
  ── Failure ('test-c4h_time.R:101:3'): Time examples run without problems ───────
  Expected `dim(stat_daily$data)[["time"]]` to equal 1116.
  Differences:
    `actual`: 1147.0
  `expected`: 1116.0
  
  
  [ FAIL 2 | WARN 37 | SKIP 8 | PASS 543 ]
  Error:
  ! Test failures.
  Execution halted