예제 #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
예제 #2
0
    def __init__(self, target):
        """
        :param object target: The object to wrap.
        """

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

        self._proxy = current_space().proxy_for(target)
예제 #4
0
 def push_thread_space_to_queue(queue):
     queue.put(lifecycle.current_space())
예제 #5
0
 def push_thread_space_to_queue(queue):
     queue.put(lifecycle.current_space())