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

Method test_stdin_pipe

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

Source from the content-addressed store, hash-verified

531 executable=sys.executable)
532
533 def test_stdin_pipe(self):
534 # stdin redirection
535 p = subprocess.Popen([sys.executable, "-c",
536 'import sys; sys.exit(sys.stdin.read() == "pear")'],
537 stdin=subprocess.PIPE)
538 p.stdin.write(b"pear")
539 p.stdin.close()
540 p.wait()
541 self.assertEqual(p.returncode, 1)
542
543 def test_stdin_filedes(self):
544 # stdin is set to open file descriptor

Callers

nothing calls this directly

Calls 4

waitMethod · 0.95
writeMethod · 0.45
closeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected