File: test_hub_options.R

package info (click to toggle)
r-bioc-annotationhub 3.6.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 620 kB
  • sloc: makefile: 2
file content (22 lines) | stat: -rw-r--r-- 647 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
test_option_key <- function(){

    checkIdentical(.hub_option_key("ASK"), "ASK")
    checkException(.hub_option_key("NOTFOUND"))
}

test_get_option <- function(){

    checkException(getAnnotationHubOption("NOTFOUND"))
    checkIdentical(getAnnotationHubOption("URL"),
                   "https://annotationhub.bioconductor.org")

}

test_set_option <- function(){

    checkException(setAnnotationHubOption("NOTFOUND"))
    orig_max <- getAnnotationHubOption("MAX_DOWNLOADS")
    setAnnotationHubOption("MAX_DOWNLOADS",100)
    checkIdentical(getAnnotationHubOption("MAX_DOWNLOADS"), 100L)
    setAnnotationHubOption("MAX_DOWNLOADS",orig_max)
}