def mirrored(setup):
    """Convience decorator for setUp in testcases::

        @mirrored
        def setUp(self, mirror, mock):
            ...

    is the same as::

        def setUp(self):
            self.mirror, self.mock = mirror()
            mirror, mock = self.mirror, self.mock
            ...
    """
    @wraps(setup)
    def wrapped_setup(self):
        self.mirror, self.mock = mirror()
        return setup(self, self.mirror, self.mock)
    return wrapped_setup
def mirrored ( setup ) : @ wraps ( setup ) def wrapped_setup ( self ) : self . mirror , self . mock = mirror ( ) return setup ( self , self . mirror , self . mock ) return wrapped_setup
Convience decorator for setUp in testcases::

        @mirrored
        def setUp(self, mirror, mock):
            ...

    is the same as::

        def setUp(self):
            self.mirror, self.mock = mirror()
            mirror, mock = self.mirror, self.mock
            ...