- using R version 4.4.3 (2025-02-28 ucrt)
- using platform: x86_64-w64-mingw32
- R was compiled by
gcc.exe (GCC) 13.3.0
GNU Fortran (GCC) 13.3.0
- running under: Windows Server 2022 x64 (build 20348)
- using session charset: UTF-8
- checking for file 'BrazilDataAPI/DESCRIPTION' ... OK
- checking extension type ... Package
- this is package 'BrazilDataAPI' version '0.2.0'
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking whether package 'BrazilDataAPI' can be installed ... OK
See the install log for details.
- checking installed package size ... OK
- checking package directory ... OK
- checking 'build' directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [2s] OK
- checking whether the package can be loaded with stated dependencies ... [1s] OK
- checking whether the package can be unloaded cleanly ... [1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [2s] OK
- checking whether the namespace can be unloaded cleanly ... [2s] OK
- checking loading without being on the library search path ... [2s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [5s] OK
- checking Rd files ... [1s] OK
- checking Rd metadata ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of 'data' directory ... OK
- checking data for non-ASCII characters ... [0s] OK
- checking data for ASCII and uncompressed saves ... OK
- checking installed files from 'inst/doc' ... OK
- checking files in 'vignettes' ... OK
- checking examples ... [4s] OK
- checking for unstated dependencies in 'tests' ... OK
- checking tests ... [76s] ERROR
Running 'testthat.R' [75s]
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(BrazilDataAPI)
>
> test_check("BrazilDataAPI")
Error: Received status code 400
Error: Received status code 404
Error: status 400 - CNPJ not found or invalid.
Error: status 404 - CNPJ not found or invalid.
Saving _problems/test-get_country_info_br-24.R
Saving _problems/test-get_country_info_br-33.R
Saving _problems/test-get_country_info_br-45.R
Saving _problems/test-get_country_info_br-57.R
Saving _problems/test-get_country_info_br-67.R
Saving _problems/test-get_country_info_br-75.R
API request failed.
Saving _problems/test-get_country_info_br-84.R
Saving _problems/test-get_country_info_br-85.R
API request failed.
API request failed.
API request failed.
API request failed.
API request failed.
Saving _problems/test-get_country_info_br-102.R
Saving _problems/test-get_country_info_br-103.R
Saving _problems/test-get_country_info_br-104.R
Saving _problems/test-get_country_info_br-105.R
Saving _problems/test-get_country_info_br-106.R
Saving _problems/test-get_country_info_br-107.R
Saving _problems/test-get_country_info_br-108.R
Saving _problems/test-get_country_info_br-109.R
Datasets available in the 'BrazilDataAPI' package:
Datasets available in the 'BrazilDataAPI' package:
[ FAIL 16 | WARN 0 | SKIP 150 | PASS 91 ]
══ Skipped tests (150) ═════════════════════════════════════════════════════════
• On CRAN (150): 'test-get_brazil_banks.R:23:3',
'test-get_brazil_banks.R:42:3', 'test-get_brazil_cep.R:23:3',
'test-get_brazil_cep.R:51:3', 'test-get_brazil_child_mortality.R:23:3',
'test-get_brazil_child_mortality.R:37:3',
'test-get_brazil_child_mortality.R:43:3',
'test-get_brazil_child_mortality.R:50:3',
'test-get_brazil_child_mortality.R:56:3',
'test-get_brazil_child_mortality.R:63:3',
'test-get_brazil_child_mortality.R:69:3',
'test-get_brazil_child_mortality.R:75:3',
'test-get_brazil_child_mortality.R:81:3',
'test-get_brazil_child_mortality.R:87:3',
'test-get_brazil_child_mortality.R:93:3',
'test-get_brazil_child_mortality.R:99:3',
'test-get_brazil_child_mortality.R:110:3',
'test-get_brazil_child_mortality.R:126:3',
'test-get_brazil_child_mortality.R:135:3', 'test-get_brazil_cnpj.R:23:3',
'test-get_brazil_cnpj.R:57:3', 'test-get_brazil_cpi.R:23:3',
'test-get_brazil_cpi.R:37:3', 'test-get_brazil_cpi.R:43:3',
'test-get_brazil_cpi.R:50:3', 'test-get_brazil_cpi.R:56:3',
'test-get_brazil_cpi.R:63:3', 'test-get_brazil_cpi.R:69:3',
'test-get_brazil_cpi.R:75:3', 'test-get_brazil_cpi.R:81:3',
'test-get_brazil_cpi.R:87:3', 'test-get_brazil_cpi.R:93:3',
'test-get_brazil_cpi.R:99:3', 'test-get_brazil_cpi.R:110:3',
'test-get_brazil_cpi.R:119:3', 'test-get_brazil_cpi.R:134:3',
'test-get_brazil_cpi.R:143:3', 'test-get_brazil_cpi.R:160:3',
'test-get_brazil_energy_use.R:23:3', 'test-get_brazil_energy_use.R:37:3',
'test-get_brazil_energy_use.R:43:3', 'test-get_brazil_energy_use.R:50:3',
'test-get_brazil_energy_use.R:56:3', 'test-get_brazil_energy_use.R:63:3',
'test-get_brazil_energy_use.R:69:3', 'test-get_brazil_energy_use.R:75:3',
'test-get_brazil_energy_use.R:81:3', 'test-get_brazil_energy_use.R:87:3',
'test-get_brazil_energy_use.R:93:3', 'test-get_brazil_energy_use.R:99:3',
'test-get_brazil_energy_use.R:111:3', 'test-get_brazil_energy_use.R:122:3',
'test-get_brazil_energy_use.R:131:3', 'test-get_brazil_energy_use.R:143:3',
'test-get_brazil_energy_use.R:155:3', 'test-get_brazil_energy_use.R:164:3',
'test-get_brazil_gdp.R:23:3', 'test-get_brazil_gdp.R:38:3',
'test-get_brazil_gdp.R:44:3', 'test-get_brazil_gdp.R:51:3',
'test-get_brazil_gdp.R:57:3', 'test-get_brazil_gdp.R:64:3',
'test-get_brazil_gdp.R:70:3', 'test-get_brazil_gdp.R:76:3',
'test-get_brazil_gdp.R:82:3', 'test-get_brazil_gdp.R:88:3',
'test-get_brazil_gdp.R:94:3', 'test-get_brazil_gdp.R:100:3',
'test-get_brazil_gdp.R:112:3', 'test-get_brazil_gdp.R:123:3',
'test-get_brazil_gdp.R:132:3', 'test-get_brazil_gdp.R:144:3',
'test-get_brazil_gdp.R:157:3', 'test-get_brazil_gdp.R:169:3',
'test-get_brazil_gdp.R:178:3', 'test-get_brazil_gdp.R:188:3',
'test-get_brazil_holidays.R:23:3', 'test-get_brazil_holidays.R:41:3',
'test-get_brazil_holidays.R:54:3', 'test-get_brazil_holidays.R:62:3',
'test-get_brazil_hospital_beds.R:23:3',
'test-get_brazil_hospital_beds.R:37:3',
'test-get_brazil_hospital_beds.R:43:3',
'test-get_brazil_hospital_beds.R:50:3',
'test-get_brazil_hospital_beds.R:56:3',
'test-get_brazil_hospital_beds.R:63:3',
'test-get_brazil_hospital_beds.R:69:3',
'test-get_brazil_hospital_beds.R:75:3',
'test-get_brazil_hospital_beds.R:81:3',
'test-get_brazil_hospital_beds.R:87:3',
'test-get_brazil_hospital_beds.R:93:3',
'test-get_brazil_hospital_beds.R:99:3',
'test-get_brazil_hospital_beds.R:111:3',
'test-get_brazil_hospital_beds.R:122:3',
'test-get_brazil_hospital_beds.R:131:3',
'test-get_brazil_hospital_beds.R:143:3',
'test-get_brazil_hospital_beds.R:152:3',
'test-get_brazil_hospital_beds.R:169:3',
'test-get_brazil_hospital_beds.R:185:3',
'test-get_brazil_life_expectancy.R:24:3',
'test-get_brazil_life_expectancy.R:40:3',
'test-get_brazil_life_expectancy.R:46:3',
'test-get_brazil_life_expectancy.R:53:3',
'test-get_brazil_life_expectancy.R:60:3',
'test-get_brazil_life_expectancy.R:66:3',
'test-get_brazil_life_expectancy.R:72:3',
'test-get_brazil_life_expectancy.R:78:3',
'test-get_brazil_literacy_rate.R:24:3',
'test-get_brazil_literacy_rate.R:40:3',
'test-get_brazil_literacy_rate.R:46:3',
'test-get_brazil_literacy_rate.R:53:3',
'test-get_brazil_literacy_rate.R:60:3',
'test-get_brazil_literacy_rate.R:66:3',
'test-get_brazil_literacy_rate.R:73:3',
'test-get_brazil_literacy_rate.R:79:3',
'test-get_brazil_municipalities.R:23:3',
'test-get_brazil_municipalities.R:44:3',
'test-get_brazil_municipalities.R:50:3', 'test-get_brazil_population.R:23:3',
'test-get_brazil_population.R:40:3', 'test-get_brazil_population.R:46:3',
'test-get_brazil_population.R:52:3', 'test-get_brazil_population.R:59:3',
'test-get_brazil_population.R:65:3', 'test-get_brazil_population.R:72:3',
'test-get_brazil_population.R:79:3', 'test-get_brazil_rate_name.R:24:3',
'test-get_brazil_rate_name.R:37:3', 'test-get_brazil_rate_name.R:50:3',
'test-get_brazil_rate_name.R:63:3', 'test-get_brazil_rate_name.R:71:3',
'test-get_brazil_rate_name.R:83:3', 'test-get_brazil_rates.R:23:3',
'test-get_brazil_rates.R:44:3', 'test-get_brazil_rates.R:55:3',
'test-get_brazil_rates.R:61:3', 'test-get_brazil_unemployment.R:23:3',
'test-get_brazil_unemployment.R:39:3', 'test-get_brazil_unemployment.R:45:3',
'test-get_brazil_unemployment.R:52:3', 'test-get_brazil_unemployment.R:59:3',
'test-get_brazil_unemployment.R:65:3', 'test-get_brazil_unemployment.R:71:3',
'test-get_brazil_unemployment.R:78:3', 'test-get_brazil_unemployment.R:84:3',
'test-get_brazil_vehicle_brands.R:23:3',
'test-get_brazil_vehicle_brands.R:31:3',
'test-get_brazil_vehicle_brands.R:39:3',
'test-get_brazil_vehicle_brands.R:47:3',
'test-get_brazil_vehicle_brands.R:54:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-get_country_info_br.R:24:3'): get_country_info_br() returns tibble with correct structure ──
<curl_error_operation_timedout/curl_error/error/condition>
Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached [restcountries.com]:
Connection timed out after 10004 milliseconds
Backtrace:
▆
1. ├─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:24:3
2. │ └─httr::GET(url)
3. │ └─httr:::request_perform(req, hu$handle$handle)
4. │ ├─httr:::request_fetch(req$output, req$url, handle)
5. │ └─httr:::request_fetch.write_memory(req$output, req$url, handle)
6. │ └─curl::curl_fetch_memory(url, handle = handle)
7. └─curl:::raise_libcurl_error(...)
── Error ('test-get_country_info_br.R:33:3'): get_country_info_br() returns data of correct types ──
<curl_error_operation_timedout/curl_error/error/condition>
Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached [restcountries.com]:
Connection timed out after 10011 milliseconds
Backtrace:
▆
1. ├─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:33:3
2. │ └─httr::GET(url)
3. │ └─httr:::request_perform(req, hu$handle$handle)
4. │ ├─httr:::request_fetch(req$output, req$url, handle)
5. │ └─httr:::request_fetch.write_memory(req$output, req$url, handle)
6. │ └─curl::curl_fetch_memory(url, handle = handle)
7. └─curl:::raise_libcurl_error(...)
── Error ('test-get_country_info_br.R:45:3'): get_country_info_br() returns expected values for Brazil ──
<curl_error_operation_timedout/curl_error/error/condition>
Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached [restcountries.com]:
Connection timed out after 10011 milliseconds
Backtrace:
▆
1. ├─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:45:3
2. │ └─httr::GET(url)
3. │ └─httr:::request_perform(req, hu$handle$handle)
4. │ ├─httr:::request_fetch(req$output, req$url, handle)
5. │ └─httr:::request_fetch.write_memory(req$output, req$url, handle)
6. │ └─curl::curl_fetch_memory(url, handle = handle)
7. └─curl:::raise_libcurl_error(...)
── Error ('test-get_country_info_br.R:57:3'): get_country_info_br() returns non-empty character values ──
<curl_error_operation_timedout/curl_error/error/condition>
Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached [restcountries.com]:
Connection timed out after 10006 milliseconds
Backtrace:
▆
1. ├─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:57:3
2. │ └─httr::GET(url)
3. │ └─httr:::request_perform(req, hu$handle$handle)
4. │ ├─httr:::request_fetch(req$output, req$url, handle)
5. │ └─httr:::request_fetch.write_memory(req$output, req$url, handle)
6. │ └─curl::curl_fetch_memory(url, handle = handle)
7. └─curl:::raise_libcurl_error(...)
── Error ('test-get_country_info_br.R:67:3'): get_country_info_br() returns positive numeric values ──
<curl_error_operation_timedout/curl_error/error/condition>
Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached [restcountries.com]:
Connection timed out after 10007 milliseconds
Backtrace:
▆
1. ├─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:67:3
2. │ └─httr::GET(url)
3. │ └─httr:::request_perform(req, hu$handle$handle)
4. │ ├─httr:::request_fetch(req$output, req$url, handle)
5. │ └─httr:::request_fetch.write_memory(req$output, req$url, handle)
6. │ └─curl::curl_fetch_memory(url, handle = handle)
7. └─curl:::raise_libcurl_error(...)
── Error ('test-get_country_info_br.R:75:3'): get_country_info_br() area is approximately correct for Brazil ──
<curl_error_operation_timedout/curl_error/error/condition>
Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached [restcountries.com]:
Connection timed out after 10005 milliseconds
Backtrace:
▆
1. ├─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:75:3
2. │ └─httr::GET(url)
3. │ └─httr:::request_perform(req, hu$handle$handle)
4. │ ├─httr:::request_fetch(req$output, req$url, handle)
5. │ └─httr:::request_fetch.write_memory(req$output, req$url, handle)
6. │ └─curl::curl_fetch_memory(url, handle = handle)
7. └─curl:::raise_libcurl_error(...)
── Failure ('test-get_country_info_br.R:84:3'): get_country_info_br() population is within reasonable range ──
Expected `result$population >= 2e+08` to be TRUE.
Differences:
`actual`:
`expected`: TRUE
── Failure ('test-get_country_info_br.R:85:3'): get_country_info_br() population is within reasonable range ──
Expected `result$population <= 3e+08` to be TRUE.
Differences:
`actual`:
`expected`: TRUE
── Failure ('test-get_country_info_br.R:102:3'): get_country_info_br() has no missing values in required fields ──
Expected `is.na(result$name_common)` to be FALSE.
Differences:
`actual`:
`expected`: FALSE
── Failure ('test-get_country_info_br.R:103:3'): get_country_info_br() has no missing values in required fields ──
Expected `is.na(result$name_official)` to be FALSE.
Differences:
`actual`:
`expected`: FALSE
── Failure ('test-get_country_info_br.R:104:3'): get_country_info_br() has no missing values in required fields ──
Expected `is.na(result$region)` to be FALSE.
Differences:
`actual`:
`expected`: FALSE
── Failure ('test-get_country_info_br.R:105:3'): get_country_info_br() has no missing values in required fields ──
Expected `is.na(result$subregion)` to be FALSE.
Differences:
`actual`:
`expected`: FALSE
── Failure ('test-get_country_info_br.R:106:3'): get_country_info_br() has no missing values in required fields ──
Expected `is.na(result$capital)` to be FALSE.
Differences:
`actual`:
`expected`: FALSE
── Failure ('test-get_country_info_br.R:107:3'): get_country_info_br() has no missing values in required fields ──
Expected `is.na(result$area)` to be FALSE.
Differences:
`actual`:
`expected`: FALSE
── Failure ('test-get_country_info_br.R:108:3'): get_country_info_br() has no missing values in required fields ──
Expected `is.na(result$population)` to be FALSE.
Differences:
`actual`:
`expected`: FALSE
── Failure ('test-get_country_info_br.R:109:3'): get_country_info_br() has no missing values in required fields ──
Expected `is.na(result$languages)` to be FALSE.
Differences:
`actual`:
`expected`: FALSE
[ FAIL 16 | WARN 0 | SKIP 150 | PASS 91 ]
Error:
! Test failures.
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [8s] OK
- checking PDF version of manual ... [17s] OK
- checking HTML version of manual ... [5s] OK
- DONE
Status: 1 ERROR