bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)

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.
This commit is contained in:
Nathan Henrie 2018-03-09 10:43:45 -07:00 committed by Yury Selivanov
parent 32efcd1306
commit 12f74d8608
3 changed files with 4 additions and 0 deletions

View File

@ -1533,6 +1533,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)

View File

@ -614,6 +614,7 @@ Thomas Heller
Malte Helmert
Lance Finn Helsten
Jonathan Hendry
Nathan Henrie
Michael Henry
James Henstridge
Kasun Herath

View File

@ -0,0 +1,2 @@
Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport of
``KqueueSelector`` loop was not being closed.