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

Method test_communicate_stdin

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

Source from the content-addressed store, hash-verified

919 subprocess.Popen(ZERO_RETURN_CMD, env=newenv)
920
921 def test_communicate_stdin(self):
922 p = subprocess.Popen([sys.executable, "-c",
923 'import sys;'
924 'sys.exit(sys.stdin.read() == "pear")'],
925 stdin=subprocess.PIPE)
926 p.communicate(b"pear")
927 self.assertEqual(p.returncode, 1)
928
929 def test_communicate_stdout(self):
930 p = subprocess.Popen([sys.executable, "-c",

Callers

nothing calls this directly

Calls 2

communicateMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected