Skip to content

Commit 3f55f14

Browse files
use sys.executable
1 parent 6b87ae7 commit 3f55f14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_asyncio/test_subprocess.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,8 @@ async def get_command_stdout(cmd, *args):
697697

698698
async def main():
699699
outputs = [f'foo{i}' for i in range(10)]
700-
res = await asyncio.gather(*[get_command_stdout('echo', out) for out in outputs])
700+
res = await asyncio.gather(*[get_command_stdout(sys.executable, '-c',
701+
f'import sys; print({out!r})') for out in outputs])
701702
self.assertEqual(res, outputs)
702703

703704
self.loop.run_until_complete(main())

0 commit comments

Comments
 (0)