summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2018-03-27 21:16:49 (GMT)
committerGitHub <noreply@github.com>2018-03-27 21:16:49 (GMT)
commit8534d53333e4e918be82b041754ecd89af519e5b (patch)
tree1b0f52ca4bdb449d0ebc942cb4b6e7cb642d692e /Lib
parent30e507dff465a31901d87df791a2bac40dc88530 (diff)
downloadcpython-8534d53333e4e918be82b041754ecd89af519e5b.zip
cpython-8534d53333e4e918be82b041754ecd89af519e5b.tar.gz
cpython-8534d53333e4e918be82b041754ecd89af519e5b.tar.bz2
bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037) (GH-6113)
test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()` using the KqueueSelector. Closing `proto.transport` (as is done in `write_pty_output()`) seems to fix it. (cherry picked from commit 12f74d8608c15cacd9d5786524e2be9ca36f007e) Co-authored-by: Nathan Henrie <n8henrie@users.noreply.github.com> Also, re-enable test_read_pty_output on macOS.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_asyncio/test_events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 6accbda..66c77b9 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -1475,7 +1475,6 @@ class EventLoopTestsMixin:
@unittest.skipUnless(sys.platform != 'win32',
"Don't support pipes for Windows")
- @unittest.skipIf(sys.platform == 'darwin', 'test hangs on MacOS')
def test_read_pty_output(self):
proto = MyReadPipeProto(loop=self.loop)
@@ -1502,6 +1501,7 @@ class EventLoopTestsMixin:
self.assertEqual(5, proto.nbytes)
os.close(slave)
+ proto.transport.close()
self.loop.run_until_complete(proto.done)
self.assertEqual(
['INITIAL', 'CONNECTED', 'EOF', 'CLOSED'], proto.state)