pi_portal.modules.python.rpi.patch
Raspberry PI GPIO compatibility shim.
- pi_portal.modules.python.rpi.patch.patch_module(module_name, substitute_module=None)[source]
Mock or substitute an import if not running on the ‘arm’ platform.
If substitute_module is None, the module will be mocked. Otherwise, the module will be replaced.
- Parameters:
module_name (
str) – The module to import.substitute_module (
Optional[str], default:None) – An optional module to substitute for the import.
- Return type:
None