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

Method test_close_stdin

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

Source from the content-addressed store, hash-verified

171
172 @gen_test
173 def test_close_stdin(self):
174 # Close the parent's stdin handle and see that the child recognizes it.
175 subproc = Subprocess(
176 [sys.executable, "-u", "-i"],
177 stdin=Subprocess.STREAM,
178 stdout=Subprocess.STREAM,
179 stderr=subprocess.STDOUT,
180 )
181 self.addCleanup(lambda: self.term_and_wait(subproc))
182 yield subproc.stdout.read_until(b">>> ")
183 subproc.stdin.close()
184 data = yield subproc.stdout.read_until_close()
185 self.assertEqual(data, b"\n")
186
187 @gen_test
188 def test_stderr(self):

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected