View source: R/skip_if_no_modules.R
skip_if_no_modules | R Documentation |
This helper function checks if a list of Python modules are available. If any are not, it skips the tests.
skip_if_no_modules(module_names)
module_names |
A vector of names of the Python modules to check. |
Nothing is returned explicitly, but if a specified module is not available, the function invokes testthat::skip
to skip the tests that require that module.
# Example usage within a test file:
module_names <- c("numpy", "pandas", "sklearn")
skip_if_no_modules(module_names)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.