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