From 8421f9fa6dadf2e30674b63cfc53b0e3472a24d6 Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Fri, 8 May 2020 18:52:08 -0400 Subject: [PATCH 1/5] Temporarily skip close_kill_running() for MultiLoopWatcher in test_asyncio --- Lib/test/test_asyncio/test_subprocess.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index 6657a88e657c25..a51e5db217d39c 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -460,6 +460,9 @@ async def cancel_make_transport(): test_utils.run_briefly(self.loop) def test_close_kill_running(self): + if isinstance(asyncio.get_child_watcher(), + unix_events.MultiLoopChildWatcher): + raise unittest.SkipTest("Temporary skip until bpo-38323 is fixed") async def kill_running(): create = self.loop.subprocess_exec(asyncio.SubprocessProtocol, From 12d754447173da19f3a8ec5325078fb23f469d3a Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Fri, 8 May 2020 19:46:20 -0400 Subject: [PATCH 2/5] Fix MultiLoopWatcher name for Windows compatibility --- Lib/test/test_asyncio/test_subprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index a51e5db217d39c..e93852a9e4b26c 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -461,7 +461,7 @@ async def cancel_make_transport(): def test_close_kill_running(self): if isinstance(asyncio.get_child_watcher(), - unix_events.MultiLoopChildWatcher): + asyncio.MultiLoopChildWatcher): raise unittest.SkipTest("Temporary skip until bpo-38323 is fixed") async def kill_running(): From 842a21ce61443ae72cf1a3f86609fa10ee335a27 Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Fri, 8 May 2020 19:50:33 -0400 Subject: [PATCH 3/5] Use self.skipTest() Co-authored-by: pppery --- Lib/test/test_asyncio/test_subprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index e93852a9e4b26c..381a1aad667bc8 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -462,7 +462,7 @@ async def cancel_make_transport(): def test_close_kill_running(self): if isinstance(asyncio.get_child_watcher(), asyncio.MultiLoopChildWatcher): - raise unittest.SkipTest("Temporary skip until bpo-38323 is fixed") + self.skipTest("Temporary skip until bpo-38323 is fixed") async def kill_running(): create = self.loop.subprocess_exec(asyncio.SubprocessProtocol, From b2105647822c1f221f2dd079040a3c99e5ce5985 Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Fri, 8 May 2020 20:22:37 -0400 Subject: [PATCH 4/5] Add Windows platform check --- Lib/test/test_asyncio/test_subprocess.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index 381a1aad667bc8..88bb6eee3867c1 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -460,9 +460,10 @@ async def cancel_make_transport(): test_utils.run_briefly(self.loop) def test_close_kill_running(self): - if isinstance(asyncio.get_child_watcher(), - asyncio.MultiLoopChildWatcher): - self.skipTest("Temporary skip until bpo-38323 is fixed") + if sys.platform != "win32": + if isinstance(asyncio.get_child_watcher(), + asyncio.MultiLoopChildWatcher): + self.skipTest("Temporary skip until bpo-38323 is fixed") async def kill_running(): create = self.loop.subprocess_exec(asyncio.SubprocessProtocol, From c42449f035552ff03524ef6ca2e5e6bc4d4578da Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Sat, 9 May 2020 01:49:12 -0400 Subject: [PATCH 5/5] Check self.Watcher instead of asyncio.get_child_watcher() Co-authored-by: Chris Jerdonek --- Lib/test/test_asyncio/test_subprocess.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index 88bb6eee3867c1..c6852b80fe5719 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -460,10 +460,9 @@ async def cancel_make_transport(): test_utils.run_briefly(self.loop) def test_close_kill_running(self): - if sys.platform != "win32": - if isinstance(asyncio.get_child_watcher(), - asyncio.MultiLoopChildWatcher): - self.skipTest("Temporary skip until bpo-38323 is fixed") + if (sys.platform != "win32" and + self.Watcher == asyncio.MultiLoopChildWatcher): + self.skipTest("Temporary skip until bpo-38323 is fixed") async def kill_running(): create = self.loop.subprocess_exec(asyncio.SubprocessProtocol,