MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_capture_output

Method test_capture_output

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

Source from the content-addressed store, hash-verified

1912 subprocess.run(args, env={})
1913
1914 def test_capture_output(self):
1915 cp = self.run_python(("import sys;"
1916 "sys.stdout.write('BDFL'); "
1917 "sys.stderr.write('FLUFL')"),
1918 capture_output=True)
1919 self.assertIn(b'BDFL', cp.stdout)
1920 self.assertIn(b'FLUFL', cp.stderr)
1921
1922 def test_stdout_stdout(self):
1923 # 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