-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from pbulsink/cran-again
Cran again
- Loading branch information
Showing
18 changed files
with
87 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,41 @@ | ||
require(httptest2, quietly = TRUE) | ||
|
||
|
||
# helper function to skip tests if we don't have the fastf1 module | ||
skip_if_no_ff1 <- function() { | ||
if (!require("reticulate", quietly = TRUE)) { | ||
testthat::skip("Reticulate unavailable for testing") | ||
} | ||
have_ff1 <- "fastf1" %in% reticulate::py_list_packages()$package | ||
if (!have_ff1) { | ||
testthat::skip("fastf1 not available for testing") | ||
} | ||
} | ||
|
||
|
||
# helper function to skip tests if we don't have ggplot2 | ||
skip_if_no_ggplot2 <- function() { | ||
if (!require("ggplot2", quietly = TRUE)) { | ||
testthat::skip("ggplot2 not available for testing") | ||
} | ||
} | ||
|
||
|
||
# helper function to skip if python isn't available by reticulate | ||
skip_if_no_py <- function() { | ||
if (!require("reticulate", quietly = TRUE)) { | ||
testthat::skip("Reticulate unavailable for testing") | ||
} | ||
if (!reticulate::py_available(initialize = TRUE)) { | ||
testthat::skip("Python not available for testing") | ||
} | ||
} | ||
|
||
|
||
# helper function to skip if ergast isn't working | ||
skip_if_no_ergast <- function() { | ||
testthat::skip_if_offline("ergast.com") # This will also skip on CRAN | ||
if (is.null(get_ergast_content("current/circuits.json?limit=40"))) { | ||
testthat::skip("No ergast connection available for testing") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.