(self)
| 554 | self.assertEqual(p.returncode, 1) |
| 555 | |
| 556 | def test_stdin_fileobj(self): |
| 557 | # stdin is set to open file object |
| 558 | tf = tempfile.TemporaryFile() |
| 559 | self.addCleanup(tf.close) |
| 560 | tf.write(b"pear") |
| 561 | tf.seek(0) |
| 562 | p = subprocess.Popen([sys.executable, "-c", |
| 563 | 'import sys; sys.exit(sys.stdin.read() == "pear")'], |
| 564 | stdin=tf) |
| 565 | p.wait() |
| 566 | self.assertEqual(p.returncode, 1) |
| 567 | |
| 568 | def test_stdout_pipe(self): |
| 569 | # stdout redirection |
nothing calls this directly
no test coverage detected