We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
import tests
1 parent 2090537 commit e955017Copy full SHA for e955017
tests/test_context.py
@@ -5,12 +5,12 @@
5
import random
6
import socket
7
import ssl
8
+import sys
9
import tempfile
10
import unittest
11
import weakref
12
13
from uvloop import _testbase as tb
-from tests.test_process import _AsyncioTests
14
15
16
class _BaseProtocol(asyncio.BaseProtocol):
@@ -683,8 +683,11 @@ def test_subprocess_protocol(self):
683
async def test():
684
self.assertEqual(cvar.get(), 'outer')
685
cvar.set('inner')
686
- await self.loop.subprocess_exec(lambda: proto,
687
- *_AsyncioTests.PROGRAM_CAT)
+ await self.loop.subprocess_exec(
+ lambda: proto, sys.executable, b'-c',
688
+ b';'.join((b'import sys',
689
+ b'data = sys.stdin.buffer.read()',
690
+ b'sys.stdout.buffer.write(data)')))
691
692
try:
693
inner = await proto.connection_made_fut
0 commit comments