File: helper-skip.R

package info (click to toggle)
r-cran-plotly 4.10.4%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 30,636 kB
  • sloc: javascript: 195,272; sh: 24; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 854 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
23
24
25
r_version <- paste(R.version$major, R.version$minor, sep = ".")
r_release <- rversions::r_release()$version
is_release <- isTRUE(r_release == r_version)
is_win <- .Platform$OS.type == "windows"

skip_cloud_tests <- function() {
  skip_on_cran()
  if (is.na(Sys.getenv("plotly_username", NA))) {
    skip("Cloud testing requires a plotly account (plotly_username)")
  }
  if (is.na(Sys.getenv("plotly_api_key", NA))) {
    skip("Cloud testing requires a plotly account (plotly_api_key)")
  }
  if (!is_release || !is_win) {
    skip("Cloud testing is only run on Windows with the current release of R")
  }
}

skip_shinytest_tests <- function() {
  skip_on_cran()
  skip_if_not_installed("shinytest")
  if (!grepl("true", Sys.getenv("SHINYTEST"), fixed = TRUE)) {
    skip("shinytest testing requires the SHINYTEST environment variable to be true")
  }
}