(self)
| 586 | self.assertEqual(os.read(d, 1024), b"orange") |
| 587 | |
| 588 | def test_stdout_fileobj(self): |
| 589 | # stdout is set to open file object |
| 590 | tf = tempfile.TemporaryFile() |
| 591 | self.addCleanup(tf.close) |
| 592 | p = subprocess.Popen([sys.executable, "-c", |
| 593 | 'import sys; sys.stdout.write("orange")'], |
| 594 | stdout=tf) |
| 595 | p.wait() |
| 596 | tf.seek(0) |
| 597 | self.assertEqual(tf.read(), b"orange") |
| 598 | |
| 599 | def test_stderr_pipe(self): |
| 600 | # stderr redirection |
nothing calls this directly
no test coverage detected