def METHOD_NAME(func, Popen=MockPopen):
    """ Decorator for running a test with a Process """
    def handler(*args, **kwargs):
        self = args[0]
        self.process = omero.processor.ProcessI(
            self.ctx, sys.executable, self.props(), self.params(),
            Popen=Popen, callback_cast=pass_through)
        try:
            func(*args, **kwargs)
        finally:
            self.process.cleanup()
    return wraps(func)(handler)