From d90a578be8d0bd12934e2c5089b92cf1c9f9a21e Mon Sep 17 00:00:00 2001 From: Fantix King Date: Tue, 9 Feb 2021 21:27:03 -0500 Subject: [PATCH] Remove `import tests` for testinstalled --- tests/test_context.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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