def assertProcessIsRunning(self, process):
        """
        Assert that a long running process provided Process object as returned by subprocess.Popen
        has succesfuly started and is running.
        """
        return_code = process.poll()

        if return_code is not None:
            stdout = process.stdout.read()
            stderr = process.stderr.read()
            msg = ('Process exited with code=%s.\nStdout:\n%s\n\nStderr:\n%s' %
                   (return_code, stdout, stderr))
            self.fail(msg)
dataset/ETHPy150Open StackStorm/st2/st2tests/st2tests/base.py/IntegrationTestCase.assertProcessIsRunning/original