Skip to content

Commit

Permalink
use sys.executable
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaraditya303 committed Dec 10, 2022
1 parent 6b87ae7 commit 3f55f14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/test/test_asyncio/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,8 @@ async def get_command_stdout(cmd, *args):

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

self.loop.run_until_complete(main())
Expand Down

0 comments on commit 3f55f14

Please sign in to comment.