MCPcopy
hub / github.com/tornadoweb/tornado / test_close_stdin

Method test_close_stdin

tornado/test/process_test.py:163–175  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

161
162 @gen_test
163 def test_close_stdin(self):
164 # Close the parent's stdin handle and see that the child recognizes it.
165 subproc = Subprocess(
166 [sys.executable, "-u", "-i", "-I"],
167 stdin=Subprocess.STREAM,
168 stdout=Subprocess.STREAM,
169 stderr=subprocess.STDOUT,
170 )
171 self.addCleanup(lambda: self.term_and_wait(subproc))
172 yield subproc.stdout.read_until(b">>> ")
173 subproc.stdin.close()
174 data = yield subproc.stdout.read_until_close()
175 self.assertEqual(data, b"\n")
176
177 @gen_test
178 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