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

Method test_issue8780

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

Source from the content-addressed store, hash-verified

1615 results)
1616
1617 def test_issue8780(self):
1618 # Ensure that stdout is inherited from the parent
1619 # if stdout=PIPE is not used
1620 code = ';'.join((
1621 'import subprocess, sys',
1622 'retcode = subprocess.call('
1623 "[sys.executable, '-c', 'print(\"Hello World!\")'])",
1624 'assert retcode == 0'))
1625 output = subprocess.check_output([sys.executable, '-c', code])
1626 self.assertStartsWith(output, b'Hello World!')
1627
1628 def test_handles_closed_on_exception(self):
1629 # If CreateProcess exits with an error, ensure the

Callers

nothing calls this directly

Calls 3

assertStartsWithMethod · 0.80
joinMethod · 0.45
check_outputMethod · 0.45

Tested by

no test coverage detected