def assertProcessIsRunning(self, process):
        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)
Assert that a long running process provided Process object as returned by subprocess.Popen
dataset/ETHPy150Open StackStorm/st2/st2tests/st2tests/base.py/IntegrationTestCase.assertProcessIsRunning