labscript_utils.testing_utils.monkeypatch

class labscript_utils.testing_utils.monkeypatch(obj, name, mocked_attr)[source]

Bases: object

Context manager to temporarily monkeypatch an object attribute with some mocked attribute

__init__(obj, name, mocked_attr)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(obj, name, mocked_attr)

Initialize self.