def test_stdin_stdout_closed(self):
        class Closed_stdin_stdout_proc(multiprocessing.Process):
            def run(self):
                sys.__stdin__.close()
                sys.__stdout__.close()
                cat = pexpect.spawn('cat')
                cat.sendeof()
                cat.expect(pexpect.EOF)

        proc = Closed_stdin_stdout_proc()
        proc.start()
        proc.join()
        assert proc.exitcode == 0
Ensure pexpect continues to operate even when stdin and stdout is closed
dataset/ETHPy150Open Calysto/metakernel/metakernel/tests/test_expect.py/ExpectTestCase.test_stdin_stdout_closed