Skip to content

Commit

Permalink
do not test unstable crandb which is no longer the default
Browse files Browse the repository at this point in the history
  • Loading branch information
Polkas committed Aug 17, 2023
1 parent 5fefb62 commit 4f7764e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 1 addition & 14 deletions tests/testthat/test-crandb.R
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 4f7764e

Please sign in to comment.