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

Method test_capture_output

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

Source from the content-addressed store, hash-verified

1914 subprocess.run(args, env={})
1915
1916 def test_capture_output(self):
1917 cp = self.run_python(("import sys;"
1918 "sys.stdout.write('BDFL'); "
1919 "sys.stderr.write('FLUFL')"),
1920 capture_output=True)
1921 self.assertIn(b'BDFL', cp.stdout)
1922 self.assertIn(b'FLUFL', cp.stderr)
1923
1924 def test_stdout_stdout(self):
1925 # run() refuses to accept stdout=STDOUT

Callers

nothing calls this directly

Calls 2

run_pythonMethod · 0.95
assertInMethod · 0.80

Tested by

no test coverage detected