Last updated on 2025-12-26 16:48:27 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 0.1.0 | 6.94 | 91.34 | 98.28 | OK | |
| r-devel-linux-x86_64-debian-gcc | 0.1.0 | 4.79 | 63.36 | 68.15 | OK | |
| r-devel-linux-x86_64-fedora-clang | 0.1.0 | 12.00 | 138.47 | 150.47 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 0.1.0 | 11.00 | 148.26 | 159.26 | OK | |
| r-devel-windows-x86_64 | 0.1.0 | 10.00 | 125.00 | 135.00 | ERROR | |
| r-patched-linux-x86_64 | 0.1.0 | 8.75 | 82.82 | 91.57 | OK | |
| r-release-linux-x86_64 | 0.1.0 | 6.53 | 81.16 | 87.69 | OK | |
| r-release-macos-arm64 | 0.1.0 | OK | ||||
| r-release-macos-x86_64 | 0.1.0 | 5.00 | 94.00 | 99.00 | OK | |
| r-release-windows-x86_64 | 0.1.0 | 10.00 | 114.00 | 124.00 | OK | |
| r-oldrel-macos-arm64 | 0.1.0 | OK | ||||
| r-oldrel-macos-x86_64 | 0.1.0 | 5.00 | 95.00 | 100.00 | OK | |
| r-oldrel-windows-x86_64 | 0.1.0 | 14.00 | 138.00 | 152.00 | OK |
Version: 0.1.0
Check: tests
Result: ERROR
Running 'testthat.R' [31s]
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(ChinAPIs)
>
> test_check("ChinAPIs")
Error: status 502
Saving _problems/test-get_china_cpi-16.R
Saving _problems/test-get_china_cpi-17.R
Saving _problems/test-get_china_cpi-22.R
Saving _problems/test-get_china_cpi-27.R
Saving _problems/test-get_china_cpi-35.R
Saving _problems/test-get_china_cpi-40.R
Saving _problems/test-get_china_cpi-41.R
Saving _problems/test-get_china_cpi-42.R
Saving _problems/test-get_china_cpi-43.R
Saving _problems/test-get_china_cpi-60.R
Saving _problems/test-get_china_cpi-65.R
Saving _problems/test-get_china_cpi-81.R
Saving _problems/test-get_china_cpi-87.R
Error: status 502
Saving _problems/test-get_china_hospital_beds-15.R
Saving _problems/test-get_china_hospital_beds-16.R
Saving _problems/test-get_china_hospital_beds-19.R
Saving _problems/test-get_china_hospital_beds-20.R
Saving _problems/test-get_china_hospital_beds-21.R
Saving _problems/test-get_china_hospital_beds-22.R
Error: status 502
Error: status 502
Error: status 502
Saving _problems/test-get_china_hospital_beds-37.R
Error: status 502
Error: status 502
Saving _problems/test-get_china_hospital_beds-47.R
Error: status 502
Error: status 502
Saving _problems/test-get_china_hospital_beds-57.R
Error: status 502
Error: status 502
Error: status 502
Saving _problems/test-get_china_hospital_beds-72.R
Error: status 502
Saving _problems/test-get_china_hospital_beds-77.R
Error: status 502
Saving _problems/test-get_china_life_expectancy-15.R
Saving _problems/test-get_china_life_expectancy-18.R
Saving _problems/test-get_china_life_expectancy-22.R
Saving _problems/test-get_china_life_expectancy-25.R
Saving _problems/test-get_china_life_expectancy-26.R
Saving _problems/test-get_china_life_expectancy-27.R
Saving _problems/test-get_china_life_expectancy-28.R
Error: status 502
Saving _problems/test-get_china_literacy_rate-15.R
Saving _problems/test-get_china_literacy_rate-18.R
Saving _problems/test-get_china_literacy_rate-21.R
Saving _problems/test-get_china_literacy_rate-22.R
Saving _problems/test-get_china_literacy_rate-23.R
Saving _problems/test-get_china_literacy_rate-24.R
Saving _problems/test-get_china_literacy_rate-36.R
Saving _problems/test-get_china_literacy_rate-39.R
Error: status 502
Saving _problems/test-get_china_population-15.R
Saving _problems/test-get_china_population-18.R
Saving _problems/test-get_china_population-22.R
Saving _problems/test-get_china_population-25.R
Saving _problems/test-get_china_population-26.R
Saving _problems/test-get_china_population-27.R
Saving _problems/test-get_china_population-28.R
Saving _problems/test-get_china_population-29.R
Saving _problems/test-get_china_population-41.R
Error: status 502
Saving _problems/test-get_china_unemployment-16.R
Saving _problems/test-get_china_unemployment-17.R
Saving _problems/test-get_china_unemployment-22.R
Saving _problems/test-get_china_unemployment-27.R
Saving _problems/test-get_china_unemployment-35.R
Saving _problems/test-get_china_unemployment-40.R
Saving _problems/test-get_china_unemployment-41.R
Saving _problems/test-get_china_unemployment-42.R
Saving _problems/test-get_china_unemployment-43.R
Saving _problems/test-get_china_unemployment-60.R
Saving _problems/test-get_china_unemployment-65.R
Saving _problems/test-get_china_unemployment-94.R
Saving _problems/test-get_china_unemployment-95.R
Saving _problems/test-get_china_unemployment-105.R
Datasets available in the 'ChinAPIs' package:
Datasets available in the 'ChinAPIs' package:
[ FAIL 62 | WARN 1 | SKIP 18 | PASS 3990 ]
══ Skipped tests (18) ══════════════════════════════════════════════════════════
• On CRAN (18): 'test-get_china_child_mortality.R:13:3',
'test-get_china_child_mortality.R:33:3',
'test-get_china_child_mortality.R:40:3',
'test-get_china_child_mortality.R:47:3', 'test-get_china_energy_use.R:13:3',
'test-get_china_energy_use.R:33:3', 'test-get_china_energy_use.R:40:3',
'test-get_china_energy_use.R:47:3', 'test-get_china_gdp.R:13:3',
'test-get_china_gdp.R:34:3', 'test-get_china_gdp.R:41:3',
'test-get_china_gdp.R:48:3', 'test-get_china_gdp.R:56:3',
'test-get_china_holidays.R:12:3', 'test-get_china_holidays.R:33:3',
'test-get_country_info_cn.R:13:3', 'test-get_country_info_cn.R:42:3',
'test-get_country_info_cn.R:56:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-get_china_cpi.R:16:3'): get_china_cpi returns a tibble/data frame ──
Expected `china_cpi_data` to be an S3 object.
Actual OO type: none.
── Failure ('test-get_china_cpi.R:17:3'): get_china_cpi returns a tibble/data frame ──
Expected `china_cpi_data` to be an S3 object.
Actual OO type: none.
── Failure ('test-get_china_cpi.R:22:3'): get_china_cpi returns data with exactly 4 columns ──
Expected `ncol(china_cpi_data)` to equal 4.
Differences:
`actual` is NULL
`expected` is a double vector (4)
── Failure ('test-get_china_cpi.R:27:3'): get_china_cpi returns data with exactly 13 rows ──
Expected `nrow(china_cpi_data)` to equal 13.
Differences:
`actual` is NULL
`expected` is a double vector (13)
── Failure ('test-get_china_cpi.R:32:3'): get_china_cpi returns data with correct column names ──
Expected `names(china_cpi_data)` to equal `c("indicator", "country", "year", "value")`.
Differences:
`actual` is NULL
`expected` is a character vector ('indicator', 'country', 'year', 'value')
── Failure ('test-get_china_cpi.R:40:3'): get_china_cpi returns data with correct column types ──
Expected `china_cpi_data$indicator` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_cpi.R:41:3'): get_china_cpi returns data with correct column types ──
Expected `china_cpi_data$country` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_cpi.R:42:3'): get_china_cpi returns data with correct column types ──
Expected `china_cpi_data$year` to have type "integer".
Actual type: "NULL"
── Failure ('test-get_china_cpi.R:43:3'): get_china_cpi returns data with correct column types ──
Expected `china_cpi_data$value` to have type "double".
Actual type: "NULL"
── Failure ('test-get_china_cpi.R:60:3'): get_china_cpi year column covers 2010-2022 completely ──
Expected `actual_years` to equal `expected_years`.
Differences:
`actual` is NULL
`expected` is an integer vector (2010, 2011, 2012, 2013, 2014, ...)
── Failure ('test-get_china_cpi.R:65:3'): get_china_cpi year column has no duplicate years ──
Expected `length(unique(china_cpi_data$year))` to equal 13.
Differences:
`actual`: 0.0
`expected`: 13.0
── Failure ('test-get_china_cpi.R:81:3'): get_china_cpi shows 2010 baseline value as 100 ──
Expected `baseline_value` to equal 100.
Differences:
`actual` is NULL
`expected` is a double vector (100)
── Error ('test-get_china_cpi.R:87:3'): get_china_cpi values show realistic CPI progression ──
Error in `order(china_cpi_data$year)`: argument 1 is not a vector
Backtrace:
▆
1. └─base::order(china_cpi_data$year) at test-get_china_cpi.R:87:3
── Failure ('test-get_china_hospital_beds.R:15:3'): get_china_hospital_beds returns a tibble with correct structure and types ──
Expected `result` to be an S3 object.
Actual OO type: none.
── Failure ('test-get_china_hospital_beds.R:16:3'): get_china_hospital_beds returns a tibble with correct structure and types ──
Expected `result` to have names `c("indicator", "country", "year", "value")`.
Differences:
`actual` is NULL
`expected` is a character vector ('indicator', 'country', 'year', 'value')
── Failure ('test-get_china_hospital_beds.R:19:3'): get_china_hospital_beds returns a tibble with correct structure and types ──
Expected `result$indicator` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_hospital_beds.R:20:3'): get_china_hospital_beds returns a tibble with correct structure and types ──
Expected `result$country` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_hospital_beds.R:21:3'): get_china_hospital_beds returns a tibble with correct structure and types ──
Expected `result$year` to have type "integer".
Actual type: "NULL"
── Failure ('test-get_china_hospital_beds.R:22:3'): get_china_hospital_beds returns a tibble with correct structure and types ──
Expected `result$value` to have type "double".
Actual type: "NULL"
── Failure ('test-get_china_hospital_beds.R:37:3'): get_china_hospital_beds returns 13 rows (one per year) ──
Expected `nrow(result)` to equal 13.
Differences:
`actual` is NULL
`expected` is a double vector (13)
── Failure ('test-get_china_hospital_beds.R:47:3'): get_china_hospital_beds allows for missing values (e.g., NA) ──
Expected `any(is.na(result$value))` to be TRUE.
Differences:
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_china_hospital_beds.R:57:3'): get_china_hospital_beds returns a numeric vector in the value column ──
Expected `result$value` to have type "double".
Actual type: "NULL"
── Failure ('test-get_china_hospital_beds.R:72:3'): get_china_hospital_beds: indicator is consistent across all rows ──
Expected `length(unique(result$indicator))` to equal 1.
Differences:
`actual`: 0.0
`expected`: 1.0
── Failure ('test-get_china_hospital_beds.R:77:3'): get_china_hospital_beds: country is consistent across all rows ──
Expected `length(unique(result$country))` to equal 1.
Differences:
`actual`: 0.0
`expected`: 1.0
── Failure ('test-get_china_life_expectancy.R:15:3'): get_china_life_expectancy returns a tibble with correct structure and values ──
Expected `result` to be an S3 object.
Actual OO type: none.
── Failure ('test-get_china_life_expectancy.R:18:3'): get_china_life_expectancy returns a tibble with correct structure and values ──
Expected `nrow(result)` to equal 13.
Differences:
`actual` is NULL
`expected` is a double vector (13)
── Failure ('test-get_china_life_expectancy.R:22:3'): get_china_life_expectancy returns a tibble with correct structure and values ──
Expected `result` to have names `expected_names`.
Differences:
`actual` is NULL
`expected` is a character vector ('indicator', 'country', 'year', 'value')
── Failure ('test-get_china_life_expectancy.R:25:3'): get_china_life_expectancy returns a tibble with correct structure and values ──
Expected `result$indicator` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_life_expectancy.R:26:3'): get_china_life_expectancy returns a tibble with correct structure and values ──
Expected `result$country` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_life_expectancy.R:27:3'): get_china_life_expectancy returns a tibble with correct structure and values ──
Expected `result$year` to have type "integer".
Actual type: "NULL"
── Failure ('test-get_china_life_expectancy.R:28:3'): get_china_life_expectancy returns a tibble with correct structure and values ──
Expected `result$value` to have type "double".
Actual type: "NULL"
── Failure ('test-get_china_literacy_rate.R:15:3'): get_china_literacy_rate() returns valid structure and types ──
Expected `result` to be an S3 object.
Actual OO type: none.
── Failure ('test-get_china_literacy_rate.R:18:3'): get_china_literacy_rate() returns valid structure and types ──
Expected `result` to have names `c("indicator", "country", "year", "value")`.
Differences:
`actual` is NULL
`expected` is a character vector ('indicator', 'country', 'year', 'value')
── Failure ('test-get_china_literacy_rate.R:21:3'): get_china_literacy_rate() returns valid structure and types ──
Expected `result$indicator` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_literacy_rate.R:22:3'): get_china_literacy_rate() returns valid structure and types ──
Expected `result$country` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_literacy_rate.R:23:3'): get_china_literacy_rate() returns valid structure and types ──
Expected `result$year` to have type "integer".
Actual type: "NULL"
── Failure ('test-get_china_literacy_rate.R:24:3'): get_china_literacy_rate() returns valid structure and types ──
Expected `is.numeric(result$value) || is.integer(result$value)` to be TRUE.
Differences:
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_china_literacy_rate.R:36:3'): get_china_literacy_rate() returns valid structure and types ──
Expected `nrow(result)` to equal 13.
Differences:
`actual` is NULL
`expected` is a double vector (13)
── Failure ('test-get_china_literacy_rate.R:39:3'): get_china_literacy_rate() returns valid structure and types ──
Expected `any(is.na(result$value)) || any(!is.na(result$value))` to be TRUE.
Differences:
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_china_population.R:15:3'): get_china_population() returns correct structure and types ──
Expected `is.null(result)` to be FALSE.
Differences:
`actual`: TRUE
`expected`: FALSE
── Failure ('test-get_china_population.R:18:3'): get_china_population() returns correct structure and types ──
Expected `result` to be an S3 object.
Actual OO type: none.
── Failure ('test-get_china_population.R:22:3'): get_china_population() returns correct structure and types ──
Expected `result` to have names `expected_cols`.
Differences:
`actual` is NULL
`expected` is a character vector ('indicator', 'country', 'year', 'value', 'value_label')
── Failure ('test-get_china_population.R:25:3'): get_china_population() returns correct structure and types ──
Expected `result$indicator` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_population.R:26:3'): get_china_population() returns correct structure and types ──
Expected `result$country` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_population.R:27:3'): get_china_population() returns correct structure and types ──
Expected `result$year` to have type "integer".
Actual type: "NULL"
── Failure ('test-get_china_population.R:28:3'): get_china_population() returns correct structure and types ──
Expected `is.numeric(result$value) || is.integer(result$value)` to be TRUE.
Differences:
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_china_population.R:29:3'): get_china_population() returns correct structure and types ──
Expected `result$value_label` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_population.R:41:3'): get_china_population() returns correct structure and types ──
Expected `nrow(result)` to equal 13.
Differences:
`actual` is NULL
`expected` is a double vector (13)
── Failure ('test-get_china_unemployment.R:16:3'): get_china_unemployment returns a tibble/data frame ──
Expected `china_unemployment_data` to be an S3 object.
Actual OO type: none.
── Failure ('test-get_china_unemployment.R:17:3'): get_china_unemployment returns a tibble/data frame ──
Expected `china_unemployment_data` to be an S3 object.
Actual OO type: none.
── Failure ('test-get_china_unemployment.R:22:3'): get_china_unemployment returns data with exactly 4 columns ──
Expected `ncol(china_unemployment_data)` to equal 4.
Differences:
`actual` is NULL
`expected` is a double vector (4)
── Failure ('test-get_china_unemployment.R:27:3'): get_china_unemployment returns data with exactly 13 rows ──
Expected `nrow(china_unemployment_data)` to equal 13.
Differences:
`actual` is NULL
`expected` is a double vector (13)
── Failure ('test-get_china_unemployment.R:32:3'): get_china_unemployment returns data with correct column names ──
Expected `names(china_unemployment_data)` to equal `c("indicator", "country", "year", "value")`.
Differences:
`actual` is NULL
`expected` is a character vector ('indicator', 'country', 'year', 'value')
── Failure ('test-get_china_unemployment.R:40:3'): get_china_unemployment returns data with correct column types ──
Expected `china_unemployment_data$indicator` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_unemployment.R:41:3'): get_china_unemployment returns data with correct column types ──
Expected `china_unemployment_data$country` to have type "character".
Actual type: "NULL"
── Failure ('test-get_china_unemployment.R:42:3'): get_china_unemployment returns data with correct column types ──
Expected `china_unemployment_data$year` to have type "integer".
Actual type: "NULL"
── Failure ('test-get_china_unemployment.R:43:3'): get_china_unemployment returns data with correct column types ──
Expected `china_unemployment_data$value` to have type "double".
Actual type: "NULL"
── Failure ('test-get_china_unemployment.R:60:3'): get_china_unemployment year column covers 2010-2022 completely ──
Expected `actual_years` to equal `expected_years`.
Differences:
`actual` is NULL
`expected` is an integer vector (2010, 2011, 2012, 2013, 2014, ...)
── Failure ('test-get_china_unemployment.R:65:3'): get_china_unemployment year column has no duplicate years ──
Expected `length(unique(china_unemployment_data$year))` to equal 13.
Differences:
`actual`: 0.0
`expected`: 13.0
── Failure ('test-get_china_unemployment.R:94:3'): get_china_unemployment shows expected COVID-19 impact in 2020 ──
Expected `year_of_max` to equal 2020.
Differences:
`actual` is NULL
`expected` is a double vector (2020)
── Failure ('test-get_china_unemployment.R:95:3'): get_china_unemployment shows expected COVID-19 impact in 2020 ──
Expected `max_unemployment` to equal 5.
Differences:
`actual`: -Inf
`expected`: 5.0
── Error ('test-get_china_unemployment.R:105:3'): get_china_unemployment values show typical stability for China ──
Error in `var(china_unemployment_data$value)`: 'x' is NULL
Backtrace:
▆
1. └─stats::var(china_unemployment_data$value) at test-get_china_unemployment.R:105:3
[ FAIL 62 | WARN 1 | SKIP 18 | PASS 3990 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-windows-x86_64