skip_if_no_modules {GeneSelectR} | 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)