Skip to content

Commit

Permalink
Reduce locs and improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot committed Feb 26, 2023
1 parent b74107d commit af96e40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions R/resolve.R
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,6 @@ query_sysreqs <- function(rang, os = "ubuntu-20.04") {
singleline_sysreqs <- paste0(raw_sys_reqs[!is.na(raw_sys_reqs)], collapse = ", ")
singleline_sysreqs <- gsub("\\n", " ", singleline_sysreqs)
.query_singleline_sysreqs(singleline_sysreqs = singleline_sysreqs, arch = arch)
## baseurl <- "https://sysreqs.r-hub.io/map/"
## url <- utils::URLencode(paste0(baseurl, singleline_sysreqs))
## checkable_cmds <- vapply(jsonlite::read_json(url), .extract_sys_package, character(1), arch = arch)
## uncheckable_cmds <- .extract_uncheckable_sysreqs(singleline_sysreqs, arch = arch)
## return(c(checkable_cmds, uncheckable_cmds))
}

.query_singleline_sysreqs <- function(singleline_sysreqs, arch) {
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test_resolve.R
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ test_that(".query_sysreqs_bioc with uncheckable info", {
expect_true("yum install -y xz-devel" %in% x)
expect_true("yum install -y make" %in% x)
expect_false("yum install -y" %in% x) ## the null response from C++
x <- .query_singleline_sysreqs("libxml2", "DEB")
expect_equal(x, "apt-get install -y libxml2-dev")
x <- .query_singleline_sysreqs("C++", "DEB")
expect_equal(x, character(0))
})

test_that("issue 89", {
Expand Down

0 comments on commit af96e40

Please sign in to comment.