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

Method test_capture_stdout

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

Source from the content-addressed store, hash-verified

1823 self.run_python("while True: pass", timeout=0.0001)
1824
1825 def test_capture_stdout(self):
1826 # capture stdout with zero return code
1827 cp = self.run_python("print('BDFL')", stdout=subprocess.PIPE)
1828 self.assertIn(b'BDFL', cp.stdout)
1829
1830 def test_capture_stderr(self):
1831 cp = self.run_python("import sys; sys.stderr.write('BDFL')",

Callers

nothing calls this directly

Calls 2

run_pythonMethod · 0.95
assertInMethod · 0.80

Tested by

no test coverage detected