diff --git a/tests/test_context.py b/tests/test_context.py index 2306eedc..c3c4bd7d 100644 --- a/tests/test_context.py +++ b/tests/test_context.py @@ -5,12 +5,12 @@ import random import socket import ssl +import sys import tempfile import unittest import weakref from uvloop import _testbase as tb -from tests.test_process import _AsyncioTests class _BaseProtocol(asyncio.BaseProtocol): @@ -683,8 +683,11 @@ def test_subprocess_protocol(self): async def test(): self.assertEqual(cvar.get(), 'outer') cvar.set('inner') - await self.loop.subprocess_exec(lambda: proto, - *_AsyncioTests.PROGRAM_CAT) + await self.loop.subprocess_exec( + lambda: proto, sys.executable, b'-c', + b';'.join((b'import sys', + b'data = sys.stdin.buffer.read()', + b'sys.stdout.buffer.write(data)'))) try: inner = await proto.connection_made_fut