]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 21 Aug 2021 20:09:08 +0000 (23:09 +0300)
committerGitHub <noreply@github.com>
Sat, 21 Aug 2021 20:09:08 +0000 (23:09 +0300)
The code of the test was never executed because the test function
was unintentionally converted to a generator function.

Lib/test/test_asyncio/test_events.py

index e78176997a059141611986e26aff724c4c432889..e50a53d706784057c27d302062b105c1e6657378 100644 (file)
@@ -1971,10 +1971,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):