[Python-checkins] bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)

serhiy-storchaka webhook-mailer at python.org
Sat Aug 21 16:09:16 EDT 2021


https://github.com/python/cpython/commit/585390fdd8661b4bc08bdfc27551292da9b4b9b8
commit: 585390fdd8661b4bc08bdfc27551292da9b4b9b8
branch: main
author: Serhiy Storchaka <storchaka at gmail.com>
committer: serhiy-storchaka <storchaka at gmail.com>
date: 2021-08-21T23:09:08+03:00
summary:

bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)

The code of the test was never executed because the test function
was unintentionally converted to a generator function.

files:
M Lib/test/test_asyncio/test_events.py

diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index e78176997a0591..e50a53d7067840 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -1971,10 +1971,11 @@ def test_subprocess_wait_no_same_group(self):
                         functools.partial(MySubprocessProtocol, self.loop),
                         'exit 7', stdin=None, stdout=None, stderr=None,
                         start_new_session=True)
-        _, proto = yield self.loop.run_until_complete(connect)
+        transp, proto = self.loop.run_until_complete(connect)
         self.assertIsInstance(proto, MySubprocessProtocol)
         self.loop.run_until_complete(proto.completed)
         self.assertEqual(7, proto.returncode)
+        transp.close()
 
     def test_subprocess_exec_invalid_args(self):
         async def connect(**kwds):



More information about the Python-checkins mailing list