Пример #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())