class documentation

Context manager that temporarily monkey patches the given function.

If a namespace is provided, all functions with same name as the function you are monkey patching that are imported (recursively) by the module_or_fcn module are also monkey patched.

Parameters
module_or_fcna module or function
monkey_fcnthe function to monkey patch in
fcn_namethe name of the function to monkey patch. Required iff module_or_fcn is a module
namespacean optional package namespace
Method __enter__ Undocumented
Method __exit__ Undocumented
Method __init__ Undocumented
Instance Variable fcn_name Undocumented
Instance Variable module Undocumented
Instance Variable monkey_fcn Undocumented
Instance Variable namespace Undocumented
Method _find Undocumented
Method _set Undocumented
Instance Variable _orig Undocumented
Instance Variable _replace_modules Undocumented
def __enter__(self): (source)

Undocumented

def __exit__(self, *args): (source)

Undocumented

def __init__(self, module_or_fcn, monkey_fcn, fcn_name=None, namespace=None): (source)

Undocumented

fcn_name: None = (source)

Undocumented

Undocumented

monkey_fcn = (source)

Undocumented

namespace: None = (source)

Undocumented

def _find(self, module): (source)

Undocumented

def _set(self, fcn): (source)

Undocumented

Undocumented

_replace_modules: list = (source)

Undocumented