Displaying 1 result from an estimated 1 matches for "check_qrng".
Did you mean:
check_ping
2020 Jan 14
1
CRAN check fails if website is unavailable on Fedora platforms
...which is based on a web API. In last time
the testthat tests failed because the website was down.
I implemented the following code in v1.2.2 to ensure that tests are only run
if the website is accessible and to avoid the CRAN checks to fail:
> library(testthat)
> library(qrandom)
> check_qrng <- function(){
> tryCatch(
> expr = {
> req <- curl::curl_fetch_memory('https://qrng.anu.edu.au/index.php')
> req$status_code
> },
> error = function(e){
> -1
> }
> )
> }
> ## test package separated with filter...