From 2c52f4fe34b9d51f1575b3e07749b09ce9ea86a5 Mon Sep 17 00:00:00 2001 From: wilsonfreitas Date: Mon, 9 Oct 2023 07:49:04 -0300 Subject: [PATCH] Added skip_on_cran --- DESCRIPTION | 2 +- tests/testthat/test-utils.R | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 949c09d..3eb4f97 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rbcb Type: Package Title: R Interface to Brazilian Central Bank Web Services -Version: 0.1.12 +Version: 0.1.13 Author: Wilson Freitas Maintainer: Wilson Freitas Description: The Brazilian Central Bank API delivers many datasets which regard economic diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index 5e62ae1..892b30b 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -1,4 +1,8 @@ test_that("it should test http download without cache", { + if (!covr::in_covr()) { + skip_on_cran() + skip_if_offline() + } url <- "https://olinda.bcb.gov.br/olinda/servico/PTAX/versao/v1/odata/Moedas" op <- options(rbcb_cache = FALSE) withr::defer(options(op)) @@ -6,6 +10,10 @@ test_that("it should test http download without cache", { }) test_that("it should test http download with cache", { + if (!covr::in_covr()) { + skip_on_cran() + skip_if_offline() + } url <- "https://olinda.bcb.gov.br/olinda/servico/PTAX/versao/v1/odata/Moedas" op <- options(rbcb_cache = TRUE) withr::defer(options(op))