()
| 770 | |
| 771 | def test_create_subprocess_env_shell(self) -> None: |
| 772 | async def main() -> None: |
| 773 | executable = sys.executable |
| 774 | if sys.platform == "win32": |
| 775 | executable = f'"{executable}"' |
| 776 | cmd = f'''{executable} -c "import os, sys; sys.stdout.write(os.getenv('FOO'))"''' |
| 777 | env = os.environ.copy() |
| 778 | env["FOO"] = "bar" |
| 779 | proc = await asyncio.create_subprocess_shell( |
| 780 | cmd, env=env, stdout=subprocess.PIPE |
| 781 | ) |
| 782 | return proc |
| 783 | |
| 784 | self.loop.run_until_complete(self.check_stdout_output(main(), b'bar')) |
| 785 |
no test coverage detected