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

Method test_issue8780

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

joinMethod · 0.45
check_outputMethod · 0.45
assertStartsWithMethod · 0.45

Tested by

no test coverage detected