skip_if_no_modules {GeneSelectR} | R Documentation |
Check if Python Modules are Available
Description
This helper function checks if a list of Python modules are available. If any are not, it skips the tests.
Usage
skip_if_no_modules(module_names)
Arguments
module_names |
A vector of names of the Python modules to check. |
Value
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.
Examples
# Example usage within a test file:
module_names <- c("numpy", "pandas", "sklearn")
skip_if_no_modules(module_names)
[Package GeneSelectR version 1.0.1 Index]