MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_stderr

Method test_stderr

python/python3/tornado/test/process_test.py:188–199  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 4

term_and_waitMethod · 0.95
SubprocessClass · 0.90
read_untilMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected