R Under development (unstable) (2024-05-22 r86590 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # 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/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(comtradr) In the last version of comtradr the cache location has been changed, because it was not CRAN compliant. You can: ✔ Migrate the cache and clean old files with `ct_migrate_cache()` ✖ Ignore this warning, a new cache is created automatically. ℹ Delete your old cache manually with: • `rappdirs::user_cache_dir('comtradr') |> list.files(full.names = T) |> file.remove()` and • `rappdirs::user_cache_dir('comtradr_bulk') |> list.files(full.names = T) |> file.remove()` > > test_check("comtradr") 1,1,1v Checked validity of type. v Checked validity of commodity_classification. v Checked validity of reporter. v Checked validity of start and end dates. i URL that will be queried: https://comtradeapi.un.org/bulk/v1/get/C/A/HS?reporterCode=32&period=1962 Using mocks found in ../goods_bulk ✔ Checked validity of type. ✔ Checked validity of commodity_classification. ✔ Checked validity of reporter. ✔ Checked validity of start and end dates. ℹ URL that will be queried: https://comtradeapi.un.org/bulk/v1/get/C/A/HS?reporterCode=32&period=1962 Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\goods_bulk\comtradeapi.un.org\bulk\v1\get\C\A\HS-4f1d0f.json ℹ Will download files size of: 183.3 KB ℹ Will download files size of: 183.3 KB ✔ Will download files size of: 183.3 KB [19ms] ℹ Performing request, which can take a few seconds, depending on the amount of … ℹ Performing request, which can take a few seconds, depending on the amount of … Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\goods_bulk\b07f98ee4cfb477c5b86923bbf159d48ca519ccb35c35865b3578b075fc918fb-7315b4.R ✔ Performing request, which can take a few seconds, depending on the amount of … ℹ Processing bulk file, this writes to your cache directory. ℹ Processing bulk file, this writes to your cache directory. ✔ Processing bulk file, this writes to your cache directory. [393ms] Using mocks found in ../goods_bulk ✔ Checked validity of type. ✔ Checked validity of commodity_classification. ✔ Checked validity of reporter. ✔ Checked validity of start and end dates. ℹ URL that will be queried: https://comtradeapi.un.org/bulk/v1/get/C/A/HS?reporterCode=32&period=1962 Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\goods_bulk\comtradeapi.un.org\bulk\v1\get\C\A\HS-4f1d0f.json ℹ Will download files size of: 183.3 KB ℹ Will download files size of: 183.3 KB ✔ Will download files size of: 183.3 KB [18ms] ℹ Performing request, which can take a few seconds, depending on the amount of … ℹ Performing request, which can take a few seconds, depending on the amount of … Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\goods_bulk\b07f98ee4cfb477c5b86923bbf159d48ca519ccb35c35865b3578b075fc918fb-7315b4.R ✔ Performing request, which can take a few seconds, depending on the amount of … ℹ Processing bulk file, this writes to your cache directory. ✔ Processing bulk file, this writes to your cache directory. [63ms] ✔ Checked validity of type. ✔ Checked validity of commodity_classification. ✔ Checked validity of reporter. ✔ Checked validity of start and end dates. ℹ URL that will be queried: https://comtradeapi.un.org/bulk/v1/get/C/A/HS?reporterCode=32&period=1962 Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\goods_bulk\comtradeapi.un.org\bulk\v1\get\C\A\HS-4f1d0f.json ℹ Will download files size of: 183.3 KB ℹ Will download files size of: 183.3 KB ✔ Will download files size of: 183.3 KB [23ms] ℹ Performing request, which can take a few seconds, depending on the amount of … Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\goods_bulk\b07f98ee4cfb477c5b86923bbf159d48ca519ccb35c35865b3578b075fc918fb-7315b4.R ✔ Performing request, which can take a few seconds, depending on the amount of … ℹ Processing bulk file, this writes to your cache directory. ℹ Processing bulk file, this writes to your cache directory. ✔ Processing bulk file, this writes to your cache directory. [65ms] ✔ Checked validity of type. ✔ Checked validity of commodity_classification. ✔ Checked validity of reporter. ✔ Checked validity of start and end dates. ℹ URL that will be queried: https://comtradeapi.un.org/bulk/v1/get/C/A/HS?reporterCode=32&period=1962 Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\goods_bulk\comtradeapi.un.org\bulk\v1\get\C\A\HS-4f1d0f.json ℹ Will download files size of: 183.3 KB ✔ Will download files size of: 183.3 KB [34ms] ℹ Performing request, which can take a few seconds, depending on the amount of … ℹ Performing request, which can take a few seconds, depending on the amount of … Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\goods_bulk\b07f98ee4cfb477c5b86923bbf159d48ca519ccb35c35865b3578b075fc918fb-7315b4.R ✔ Performing request, which can take a few seconds, depending on the amount of … ℹ Processing bulk file, this writes to your cache directory. ℹ Processing bulk file, this writes to your cache directory. ✔ Processing bulk file, this writes to your cache directory. [44ms] Using mocks found in goods Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\testthat\goods\comtradeapi.un.org\data\v1\get\C\A\HS-5e2730.R Using mocks found in services Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\testthat\services\comtradeapi.un.org\data\v1\get\S\A\EB-b31ccb.R v Checked validity of type. v Checked validity of commodity_classification. v Checked validity of frequency. v Checked validity of flow_direction. v Checked validity of commodity_code. v Checked validity of partner. v Checked validity of partner_2. v Checked validity of mode_of_transport. v Checked validity of customs_code. v Checked validity of reporter. v Checked validity of start and end dates. i URL that will be queried: https://comtradeapi.un.org/data/v1/get/S/A/EB?cmdCode=200&flowCode=M%2CX%2CRM%2CRX&partnerCode=32%2C280%2C276&reporterCode=156&period=2010&motCode=0&partner2Code=0&customsCode=C00&includeDesc=TRUE i Performing request, which can take a few seconds, depending on the amount of data queried. v Checked validity of type. v Checked validity of commodity_classification. v Checked validity of frequency. v Checked validity of flow_direction. v Checked validity of commodity_code. v Checked validity of partner. v Checked validity of partner_2. v Checked validity of mode_of_transport. v Checked validity of customs_code. v Checked validity of reporter. v Checked validity of start and end dates. i URL that will be queried: https://comtradeapi.un.org/data/v1/get/S/A/EB?cmdCode=200&flowCode=M%2CX%2CRM%2CRX&partnerCode=32%2C280%2C276&reporterCode=156&period=2010&motCode=0&partner2Code=0&customsCode=C00&includeDesc=TRUE i Performing request, which can take a few seconds, depending on the amount of data queried. Using mocks found in data v Checked validity of type. v Checked validity of commodity_classification. v Checked validity of frequency. v Checked validity of flow_direction. v Checked validity of commodity_code. v Checked validity of partner. v Checked validity of partner_2. v Checked validity of mode_of_transport. v Checked validity of customs_code. v Checked validity of reporter. v Checked validity of start and end dates. i URL that will be queried: https://comtradeapi.un.org/data/v1/get/C/A/HS?cmdCode=TOTAL&flowCode=M%2CX%2CRM%2CRX&partnerCode=32%2C280%2C276&reporterCode=156&period=2010&motCode=0&partner2Code=0&customsCode=C00&includeDesc=TRUE i Performing request, which can take a few seconds, depending on the amount of data queried. Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\testthat\data\comtradeapi.un.org\data\v1\get\C\A\HS-60a6ad.json Using mocks found in ref_table Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\testthat\ref_table\comtradeapi.un.org\files\v1\app\reference\HS.json.R Reading D:\RCompile\CRANincoming\R-devel\comtradr.Rcheck\tests\testthat\ref_table\comtradeapi.un.org\files\v1\app\reference\HS.json.R [ FAIL 0 | WARN 0 | SKIP 0 | PASS 113 ] > > library(httptest2) > > .mockPaths('../') > .mockPaths('tests/') > > proc.time() user system elapsed 5.75 2.37 8.62