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

Method main

Lib/test/test_asyncio/test_subprocess.py:741–751  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

739
740 def test_create_subprocess_env_shell(self) -> None:
741 async def main() -> None:
742 executable = sys.executable
743 if sys.platform == "win32":
744 executable = f'"{executable}"'
745 cmd = f'''{executable} -c "import os, sys; sys.stdout.write(os.getenv('FOO'))"'''
746 env = os.environ.copy()
747 env["FOO"] = "bar"
748 proc = await asyncio.create_subprocess_shell(
749 cmd, env=env, stdout=subprocess.PIPE
750 )
751 return proc
752
753 self.loop.run_until_complete(self.check_stdout_output(main(), b'bar'))
754

Callers 1

test_subprocess.pyFile · 0.45

Calls 13

MyProtocolClass · 0.85
get_command_stdoutFunction · 0.85
assertNotEqualMethod · 0.80
copyMethod · 0.45
communicateMethod · 0.45
assertEqualMethod · 0.45
gatherMethod · 0.45
waitMethod · 0.45
subprocess_execMethod · 0.45
closeMethod · 0.45
sleepMethod · 0.45
send_signalMethod · 0.45

Tested by

no test coverage detected