()
| 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 |
no test coverage detected