summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2019-05-14 16:09:44 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-05-14 16:09:44 (GMT)
commitf12ba7cd0a7370631214ac0b337ab5455ce717b2 (patch)
tree26b7914a776c311c65cb94cd12ffe409eb4f20a8 /Lib/test/test_asyncio
parentc96be811fa7da8ddcea18cc7abcae94e0f5ff966 (diff)
downloadcpython-f12ba7cd0a7370631214ac0b337ab5455ce717b2.zip
cpython-f12ba7cd0a7370631214ac0b337ab5455ce717b2.tar.gz
cpython-f12ba7cd0a7370631214ac0b337ab5455ce717b2.tar.bz2
bpo-36916: asyncio: Swallow unhandled write() exception (GH-13313)
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_streams.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index bf93f30..8d6a1d2 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -851,6 +851,8 @@ os.close(fd)
# where it never gives up the event loop but the socket is
# closed on the server side.
+ messages = []
+ self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))
q = queue.Queue()
def server():
@@ -883,6 +885,7 @@ os.close(fd)
# Clean up the thread. (Only on success; on failure, it may
# be stuck in accept().)
thread.join()
+ self.assertEqual([], messages)
def test___repr__(self):
stream = asyncio.StreamReader(loop=self.loop,