skip_if_no_modules: Check if Python Modules are Available

View source: R/skip_if_no_modules.R

skip_if_no_modulesR 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)



GeneSelectR documentation built on May 29, 2024, 4:01 a.m.