diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-16 17:06:17 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-16 17:06:17 (GMT) |
| commit | 5173cc143dd36adbef4fb13c3b6b30677e59d2e3 (patch) | |
| tree | b92d54670c774a8e88e030d9d779c9d5a2044180 /Lib/test/test_asyncio/test_sslproto.py | |
| parent | 5160caba46c7411145016dcd487e1f8d95d1866f (diff) | |
| parent | 7c3e71163b9aa53caf5e5b73520a07968f39686c (diff) | |
| download | cpython-5173cc143dd36adbef4fb13c3b6b30677e59d2e3.zip cpython-5173cc143dd36adbef4fb13c3b6b30677e59d2e3.tar.gz cpython-5173cc143dd36adbef4fb13c3b6b30677e59d2e3.tar.bz2 | |
Merge heads
Diffstat (limited to 'Lib/test/test_asyncio/test_sslproto.py')
| -rw-r--r-- | Lib/test/test_asyncio/test_sslproto.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py index 0ca6d1b..59ff0f6 100644 --- a/Lib/test/test_asyncio/test_sslproto.py +++ b/Lib/test/test_asyncio/test_sslproto.py @@ -85,5 +85,15 @@ class SslProtoHandshakeTests(test_utils.TestCase): # Restore error logging. log.logger.setLevel(log_level) + def test_connection_lost(self): + # From issue #472. + # yield from waiter hang if lost_connection was called. + waiter = asyncio.Future(loop=self.loop) + ssl_proto = self.ssl_protocol(waiter) + self.connection_made(ssl_proto) + ssl_proto.connection_lost(ConnectionAbortedError) + test_utils.run_briefly(self.loop) + self.assertIsInstance(waiter.exception(), ConnectionAbortedError) + if __name__ == '__main__': unittest.main() |
