Esempio n. 1
0
def patch(target, value):
    """
    Replace the specified object

    :param str target: A string pointing to the target to patch.
    :param object value: The value to replace the target with.
    :return: A ``Patch`` object.
    """
    patch = current_space().patch_for(target)
    patch.set_value(value)
    return patch
Esempio n. 2
0
    def __init__(self, target):
        """
        :param object target: The object to wrap.
        """

        self._proxy = current_space().proxy_for(target)
Esempio n. 3
0
    def __init__(self, target):
        """
        :param object target: The object to wrap.
        """

        self._proxy = current_space().proxy_for(target)
Esempio n. 4
0
 def push_thread_space_to_queue(queue):
     queue.put(lifecycle.current_space())
Esempio n. 5
0
 def push_thread_space_to_queue(queue):
     queue.put(lifecycle.current_space())