(self)
| 186 | |
| 187 | @gen_test |
| 188 | def test_stderr(self): |
| 189 | # This test is mysteriously flaky on twisted: it succeeds, but logs |
| 190 | # an error of EBADF on closing a file descriptor. |
| 191 | subproc = Subprocess( |
| 192 | [sys.executable, "-u", "-c", r"import sys; sys.stderr.write('hello\n')"], |
| 193 | stderr=Subprocess.STREAM, |
| 194 | ) |
| 195 | self.addCleanup(lambda: self.term_and_wait(subproc)) |
| 196 | data = yield subproc.stderr.read_until(b"\n") |
| 197 | self.assertEqual(data, b"hello\n") |
| 198 | # More mysterious EBADF: This fails if done with self.addCleanup instead of here. |
| 199 | subproc.stderr.close() |
| 200 | |
| 201 | def test_sigchild(self): |
| 202 | Subprocess.initialize() |
nothing calls this directly
no test coverage detected