From 4f7764e0a95144e6fdd8df7a1172610586728b2c Mon Sep 17 00:00:00 2001 From: Maciej Nasinski Date: Thu, 17 Aug 2023 23:43:03 +0200 Subject: [PATCH] do not test unstable crandb which is no longer the default --- DESCRIPTION | 2 +- NEWS.md | 2 +- tests/testthat/test-crandb.R | 15 +-------------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index adbc417..b929757 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pacs Title: Supplementary Tools for R Packages Developers -Version: 0.4.10.9006 +Version: 0.4.10.9007 Authors@R: person(given = "Maciej", family = "Nasinski", diff --git a/NEWS.md b/NEWS.md index 72bb624..d33cb5a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# pacs 0.4.10.9006 +# pacs 0.4.10.9007 * unstable crandb causes that lifeduration and timemachine functions use by default cran direct calls. * protect against 404/403 results from crandb. Please update new options if needed `options(pacs.crandb_ntry = 3)` and `options(pacs.crandb_nsleep = 0.1)` to control crandb fetch diff --git a/tests/testthat/test-crandb.R b/tests/testthat/test-crandb.R index be951f6..715f8b1 100644 --- a/tests/testthat/test-crandb.R +++ b/tests/testthat/test-crandb.R @@ -1,20 +1,7 @@ -test_that("crandb", { +test_that("crandb wrong input", { skip_if_offline() - skip_on_cran() expect_identical(pacs_lifeduration(c("dplyr"), c("1.0.7", "1.6.0")), NA) expect_identical(pacs_lifeduration(c("dplyr", "shiny", "data.table"), c("1.0.7", "1.6.0")), c(NA, NA, NA)) - res <- pacs_lifeduration(c("dplyr", "shiny"), c("1.0.7", "1.6.0")) - expect_true(anyNA(res) || identical(res$lifeduration, c(235, 240))) - res <- pacs_lifeduration(c("dplyr", "shiny"), c("1.0.7", "1.6.0"), source = "loop_crandb") - expect_true(anyNA(res) || identical(res$lifeduration, c(234, 240))) - res <- pacs_lifeduration(c("dplyr", "shiny"), c("1.0.7", "1.6.0")) - expect_true( - anyNA(res) || - identical( - res, - structure(list(Package = c("dplyr", "shiny"), lifeduration = c(235, 240)), class = "data.frame", row.names = c(NA, -2L)) - ) - ) expect_identical( pacs_lifeduration(c("dplyr", "shiny", "3"), c("1.0.7", "1.6.0")), c(NA, NA, NA)