summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_subprocess.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2019-09-11 13:07:37 (GMT)
committerGitHub <noreply@github.com>2019-09-11 13:07:37 (GMT)
commit9aee90018a5213e3529768e0b873955d23f5e50b (patch)
tree36f9368f08981adac902adcbedd3223f6533c4c2 /Lib/test/test_asyncio/test_subprocess.py
parent781266ebb60e7ac781a3e07030d92275721ff3cf (diff)
downloadcpython-9aee90018a5213e3529768e0b873955d23f5e50b.zip
cpython-9aee90018a5213e3529768e0b873955d23f5e50b.tar.gz
cpython-9aee90018a5213e3529768e0b873955d23f5e50b.tar.bz2
bpo-38107: Replace direct future and task contructor calls with factories in asyncio tests (GH-15928)
Diffstat (limited to 'Lib/test/test_asyncio/test_subprocess.py')
-rw-r--r--Lib/test/test_asyncio/test_subprocess.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index b9578b2..2cfe657 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -43,7 +43,6 @@ class SubprocessTransportTests(test_utils.TestCase):
self.loop = self.new_test_loop()
self.set_event_loop(self.loop)
-
def create_transport(self, waiter=None):
protocol = mock.Mock()
protocol.connection_made._is_coroutine = False
@@ -54,7 +53,7 @@ class SubprocessTransportTests(test_utils.TestCase):
return (transport, protocol)
def test_proc_exited(self):
- waiter = asyncio.Future(loop=self.loop)
+ waiter = self.loop.create_future()
transport, protocol = self.create_transport(waiter)
transport._process_exited(6)
self.loop.run_until_complete(waiter)
@@ -80,7 +79,7 @@ class SubprocessTransportTests(test_utils.TestCase):
transport.close()
def test_subprocess_repr(self):
- waiter = asyncio.Future(loop=self.loop)
+ waiter = self.loop.create_future()
transport, protocol = self.create_transport(waiter)
transport._process_exited(6)
self.loop.run_until_complete(waiter)