]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 21 Aug 2021 20:29:18 +0000 (13:29 -0700)
committerGitHub <noreply@github.com>
Sat, 21 Aug 2021 20:29:18 +0000 (13:29 -0700)
The code of the test was never executed because the test function
was unintentionally converted to a generator function.
(cherry picked from commit 585390fdd8661b4bc08bdfc27551292da9b4b9b8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_asyncio/test_events.py

index fa6c49d89da5cdae36fe6d5745978dd60584127d..7114c2f0c71daa0135cb8e3319946e9edb13a27e 100644 (file)
@@ -1968,10 +1968,11 @@ class SubprocessTestsMixin:
                         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):