MCPcopy Index your code
hub / github.com/python/cpython / test_io_buffered_by_default

Method test_io_buffered_by_default

Lib/test/test_subprocess.py:122–134  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

120class ProcessTestCase(BaseTestCase):
121
122 def test_io_buffered_by_default(self):
123 p = subprocess.Popen(ZERO_RETURN_CMD,
124 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
125 stderr=subprocess.PIPE)
126 try:
127 self.assertIsInstance(p.stdin, io.BufferedIOBase)
128 self.assertIsInstance(p.stdout, io.BufferedIOBase)
129 self.assertIsInstance(p.stderr, io.BufferedIOBase)
130 finally:
131 p.stdin.close()
132 p.stdout.close()
133 p.stderr.close()
134 p.wait()
135
136 def test_io_unbuffered_works(self):
137 p = subprocess.Popen(ZERO_RETURN_CMD,

Callers

nothing calls this directly

Calls 3

waitMethod · 0.95
assertIsInstanceMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected